From fe408d0e34066afe8d26b317b6aff3c4171ba3c5 Mon Sep 17 00:00:00 2001 From: imrn99 <95699343+imrn99@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:15:11 +0100 Subject: [PATCH] fix tests --- honeycomb-core/src/cmap/builder/grid/tests.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/honeycomb-core/src/cmap/builder/grid/tests.rs b/honeycomb-core/src/cmap/builder/grid/tests.rs index 3f278220..5fc9baad 100644 --- a/honeycomb-core/src/cmap/builder/grid/tests.rs +++ b/honeycomb-core/src/cmap/builder/grid/tests.rs @@ -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); @@ -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); @@ -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); @@ -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);