chiark / gitweb /
jstest: lower: implement a test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 Jul 2021 18:04:36 +0000 (19:04 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 Jul 2021 18:04:36 +0000 (19:04 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
jstest/jst-lower.rs

index dabaa677fd312a78d53954849f3f236b0f72138c..0dac6a708e7f030f4e576d6c8741cb687372caf1 100644 (file)
@@ -170,6 +170,19 @@ impl Test {
     }
 
     // all targets now below all non-bottom non-targets
+    {
+      let mut had_nonbottom_nontarget = None;
+      for n in &new {
+        if ! n.bottom && ! n.target {
+          had_nonbottom_nontarget = Some(n);
+        }
+        if n.target {
+          assert!( had_nonbottom_nontarget.is_none(),
+                   "{:?} {:?}", &n, had_nonbottom_nontarget);
+        }
+      }
+    }
+
     // xxx ^ unimplemented checks
   }
 }