aboutsummaryrefslogtreecommitdiff
path: root/crates/test_utils/src/fixture.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/test_utils/src/fixture.rs')
-rw-r--r--crates/test_utils/src/fixture.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/test_utils/src/fixture.rs b/crates/test_utils/src/fixture.rs
index 779146084..6ba112de8 100644
--- a/crates/test_utils/src/fixture.rs
+++ b/crates/test_utils/src/fixture.rs
@@ -198,6 +198,7 @@ impl MiniCore {
198 self.activated_flags.iter().any(|it| it == flag) 198 self.activated_flags.iter().any(|it| it == flag)
199 } 199 }
200 200
201 #[track_caller]
201 fn assert_valid_flag(&self, flag: &str) { 202 fn assert_valid_flag(&self, flag: &str) {
202 if !self.valid_flags.iter().any(|it| it == flag) { 203 if !self.valid_flags.iter().any(|it| it == flag) {
203 panic!("invalid flag: {:?}, valid flags: {:?}", flag, self.valid_flags); 204 panic!("invalid flag: {:?}, valid flags: {:?}", flag, self.valid_flags);
@@ -299,6 +300,7 @@ impl MiniCore {
299 let skip = if flag == "" { 300 let skip = if flag == "" {
300 false 301 false
301 } else { 302 } else {
303 assert!(!flag.starts_with(' '), "region marker starts with a space: {:?}", flag);
302 self.assert_valid_flag(flag); 304 self.assert_valid_flag(flag);
303 !self.has_flag(flag) 305 !self.has_flag(flag)
304 }; 306 };