From acbc988225753c6f7552f6b85884ff71e562e428 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sat, 7 Nov 2026 08:48:40 +0700 Subject: [PATCH] Schema test: its field ids no longer repeat, now that repeats are refused --- crates/format/src/fig/interop_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/format/src/fig/interop_tests.rs b/crates/format/src/fig/interop_tests.rs index fa95d792b..4ad81cebc 100644 --- a/crates/format/src/fig/interop_tests.rs +++ b/crates/format/src/fig/interop_tests.rs @@ -403,10 +403,10 @@ fn the_schema_numbers_what_the_format_numbers() { #[test] fn schema_text_takes_numbers_and_refuses_bad_ones() { - let s = Schema::parse("enum E A=3 B C=9\nmessage M uint a=7, E b, string c=2").unwrap(); + let s = Schema::parse("enum E A=3 B C=9\nmessage M uint a=7, E b, string c=5").unwrap(); let values = |i: usize| s.defs[i].fields.iter().map(|f| (f.name.as_str(), f.value)).collect::>(); assert_eq!(values(0), [("A", 3), ("B", 1), ("C", 9)]); - assert_eq!(values(1), [("a", 7), ("b", 2), ("c", 2)]); + assert_eq!(values(1), [("a", 7), ("b", 2), ("c", 5)]); for bad in ["enum E A=", "enum E A=x", "enum E A=-1", "message M uint a=1.5", "message M uint a=99999999999", "enum E =", "message M uint ="] { assert!(Schema::parse(bad).is_err() || bad.ends_with('='), "{bad}"); }