Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imrn99 committed Nov 25, 2024
1 parent 944b697 commit fe408d0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions honeycomb-core/src/cmap/builder/grid/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ fn square_cmap2_correctness() {
assert_eq!(cmap.face_id(3), 1);
assert_eq!(cmap.face_id(4), 1);

// i-cell uses beta 0 to ensure correctness, so the iterator is BFS-like
let mut face = cmap.i_cell::<2>(1);
assert_eq!(face.next(), Some(1));
assert_eq!(face.next(), Some(2));
assert_eq!(face.next(), Some(3));
assert_eq!(face.next(), Some(4));
assert_eq!(face.next(), Some(2)); // b1
assert_eq!(face.next(), Some(4)); // b0
assert_eq!(face.next(), Some(3)); // b1b1
assert_eq!(face.next(), None);

assert_eq!(cmap.beta::<1>(1), 2);
Expand All @@ -138,8 +139,8 @@ fn square_cmap2_correctness() {
let mut face = cmap.i_cell::<2>(5);
assert_eq!(face.next(), Some(5));
assert_eq!(face.next(), Some(6));
assert_eq!(face.next(), Some(7));
assert_eq!(face.next(), Some(8));
assert_eq!(face.next(), Some(7));
assert_eq!(face.next(), None);

assert_eq!(cmap.beta::<1>(5), 6);
Expand All @@ -161,8 +162,8 @@ fn square_cmap2_correctness() {
let mut face = cmap.i_cell::<2>(9);
assert_eq!(face.next(), Some(9));
assert_eq!(face.next(), Some(10));
assert_eq!(face.next(), Some(11));
assert_eq!(face.next(), Some(12));
assert_eq!(face.next(), Some(11));
assert_eq!(face.next(), None);

assert_eq!(cmap.beta::<1>(9), 10);
Expand All @@ -184,8 +185,8 @@ fn square_cmap2_correctness() {
let mut face = cmap.i_cell::<2>(13);
assert_eq!(face.next(), Some(13));
assert_eq!(face.next(), Some(14));
assert_eq!(face.next(), Some(15));
assert_eq!(face.next(), Some(16));
assert_eq!(face.next(), Some(15));
assert_eq!(face.next(), None);

assert_eq!(cmap.beta::<1>(13), 14);
Expand Down

0 comments on commit fe408d0

Please sign in to comment.