chiark / gitweb /
jst-lower: Add a check that we do not duplicate z coordinates
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Jul 2021 12:47:28 +0000 (13:47 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Jul 2021 12:48:02 +0000 (13:48 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
jstest/jst-lower.rs

index c5ffcf8430517e788b770d8f9ca721cf14f3d97e..18015785ef85ce3d7639f7e6483fd0421f88fe7b 100644 (file)
@@ -200,6 +200,14 @@ impl Test {
         }
       }
     }
+
+    // all the z coordinates are still distinct
+    {
+      for (n0,n1) in new.iter().tuple_windows() {
+        assert!( n1.new_z > n0.new_z,
+                 "{:?} {:?}", &n0, &n1 );
+      }
+    }
   }
 }
 
@@ -385,6 +393,7 @@ defs_marker   = fake_dom[{{ pieces | length + 1 }}];
 fake_dom[{{ loop.index0 }}].nextElementSibling = fake_dom[{{ loop.index }}];
 {%- endfor %}
 fake_dom[{{ pieces | length }}].nextElementSibling = fake_dom[{{ pieces | length + 1 }}];
+defs_marker.previousElementSibling = fake_dom[{{ pieces | length }}];
 
 uorecord = {
   targets: [