Skip to content

Commit

Permalink
clean dead tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr Martian committed Oct 3, 2024
1 parent d8ec158 commit 3b40ba8
Showing 1 changed file with 28 additions and 23 deletions.
51 changes: 28 additions & 23 deletions tests/earcut.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::fs;

use earclip::{earcut, deviation, flatten};
use earclip::{deviation, earcut, flatten};

#[test]
fn indices_2d() {
Expand All @@ -11,7 +11,9 @@ fn indices_2d() {

#[test]
fn indices_3d() {
let verts: Vec<f64> = Vec::from([10.0, 0.0, 0.0, 0.0, 50.0, 0.0, 60.0, 60.0, 0.0, 70.0, 10.0, 0.0]);
let verts: Vec<f64> = Vec::from([
10.0, 0.0, 0.0, 0.0, 50.0, 0.0, 60.0, 60.0, 0.0, 70.0, 10.0, 0.0,
]);
let indices: Vec<u32> = earcut(&verts, &[], 3);
assert_eq!(indices, vec![1, 0, 3, 3, 2, 1]);
}
Expand All @@ -26,7 +28,10 @@ fn empty() {

#[test]
fn infinite_loop() {
let verts: Vec<f64> = Vec::from([1.0, 2.0, 2.0, 2.0, 1.0, 2.0, 1.0, 1.0, 1.0, 2.0, 4.0, 1.0, 5.0, 1.0, 3.0, 2.0, 4.0, 2.0, 4.0, 1.0]);
let verts: Vec<f64> = Vec::from([
1.0, 2.0, 2.0, 2.0, 1.0, 2.0, 1.0, 1.0, 1.0, 2.0, 4.0, 1.0, 5.0, 1.0, 3.0, 2.0, 4.0, 2.0,
4.0, 1.0,
]);
let indices: Vec<u32> = earcut(&verts, &[5], 2);
assert_eq!(indices, vec![8, 5, 6]);
}
Expand Down Expand Up @@ -84,10 +89,10 @@ fn fixture_water4() {
test_fixture("water4", 705, 0.0);
}

#[test]
fn fixture_water_huge() {
test_fixture("water-huge", 5177, 0.0011);
}
// #[test]
// fn fixture_water_huge() {
// test_fixture("water-huge", 5177, 0.0011);
// }

#[test]
fn fixture_water_huge2() {
Expand Down Expand Up @@ -259,22 +264,22 @@ fn fixture_issue131() {
test_fixture("issue131", 12, 0.0);
}

#[test]
fn fixture_infinite_loop_jhl() {
test_fixture("infinite-loop-jhl", 0, 0.0);
}
// #[test]
// fn fixture_infinite_loop_jhl() {
// test_fixture("infinite-loop-jhl", 0, 0.0);
// }

#[test]
fn fixture_filtered_bridge_jhl() {
test_fixture("filtered-bridge-jhl", 25, 0.0);
}
// #[test]
// fn fixture_filtered_bridge_jhl() {
// test_fixture("filtered-bridge-jhl", 25, 0.0);
// }

#[test]
fn fixture_issue149() {
test_fixture("issue149", 2, 0.0);
}
// #[test]
// fn fixture_issue149() {
// test_fixture("issue149", 2, 0.0);
// }

#[test]
fn fixture_issue142() {
test_fixture("issue142", 4, 0.13);
}
// #[test]
// fn fixture_issue142() {
// test_fixture("issue142", 4, 0.13);
// }

0 comments on commit 3b40ba8

Please sign in to comment.