From b1f041aeb7fe9102b93802bf9e8b41179eb88927 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 9 Jul 2021 19:06:58 +0100 Subject: [PATCH] jstest: lower: add another test Signed-off-by: Ian Jackson --- jstest/jst-lower.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/jstest/jst-lower.rs b/jstest/jst-lower.rs index b87132f5..3b7dd894 100644 --- a/jstest/jst-lower.rs +++ b/jstest/jst-lower.rs @@ -182,6 +182,20 @@ impl Test { } } } + + // all bottom targets now below all non-targets + { + let mut had_nontarget = None; + for n in &new { + if ! n.target { + had_nontarget = Some(n); + } + if n.bottom && n.target { + assert!( had_nontarget.is_none(), + "{:?} {:?}", &n, had_nontarget); + } + } + } } } -- 2.30.2