Skip to content

Commit

Permalink
refactor: add schema as snapshot description
Browse files Browse the repository at this point in the history
Include the source schema into snapshots for easier verification as this
displays the schema together with the output of each snapshot in review
mode.
  • Loading branch information
dnaka91 committed Oct 29, 2023
1 parent fa01844 commit 137d2cd
Show file tree
Hide file tree
Showing 111 changed files with 143 additions and 134 deletions.
16 changes: 13 additions & 3 deletions crates/stef-build/tests/compiler.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::fs;

use insta::{assert_snapshot, glob};
use insta::{assert_snapshot, glob, with_settings};
use stef_parser::Schema;

#[test]
Expand All @@ -11,7 +11,12 @@ fn compile_schema() {
let value = stef_build::compile_schema(&value);
let value = prettyplease::unparse(&syn::parse2(value.clone()).unwrap());

assert_snapshot!("compile", format!("{value}"), input.trim());
with_settings!({
description => input.trim(),
omit_expression => true,
}, {
assert_snapshot!("compile", value);
});
});
}

Expand All @@ -23,6 +28,11 @@ fn compile_schema_extra() {
let value = stef_build::compile_schema(&value);
let value = prettyplease::unparse(&syn::parse2(value.clone()).unwrap());

assert_snapshot!("compile_extra", format!("{value}"), input.trim());
with_settings!({
description => input.trim(),
omit_expression => true,
}, {
assert_snapshot!("compile_extra", value);
});
});
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Sample type alias.\ntype Sample = u32;"
description: "/// Sample type alias.\ntype Sample = u32;"
input_file: crates/stef-parser/tests/inputs/alias_basic.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "#[validate(min = 1, max = 100)]\nstruct Sample"
description: "#[validate(min = 1, max = 100)]\nstruct Sample"
input_file: crates/stef-parser/tests/inputs/attribute_multi.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "#[deprecated = \"don't use\"]\nstruct Sample"
description: "#[deprecated = \"don't use\"]\nstruct Sample"
input_file: crates/stef-parser/tests/inputs/attribute_single.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "#[deprecated]\nstruct Sample"
description: "#[deprecated]\nstruct Sample"
input_file: crates/stef-parser/tests/inputs/attribute_unit.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "#[deprecated = \"don't use\", compress]\n#[validate(\n in_range(min = 100, max = 200),\n non_empty,\n)]\nstruct Sample"
description: "#[deprecated = \"don't use\", compress]\n#[validate(\n in_range(min = 100, max = 200),\n non_empty,\n)]\nstruct Sample"
input_file: crates/stef-parser/tests/inputs/attributes.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "#[deprecated=\"don't use\",compress]\n#[validate(in_range(min=100,max=200),non_empty)]\nstruct Sample"
description: "#[deprecated=\"don't use\",compress]\n#[validate(in_range(min=100,max=200),non_empty)]\nstruct Sample"
input_file: crates/stef-parser/tests/inputs/attributes_min_ws.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "const BOOL_TRUE: bool = true;\nconst BOOL_FALSE: bool = false;\nconst INT: u32 = 100;\nconst FLOAT: f64 = 5.5;\nconst STRING: string = \"value\";\nconst BYTES: bytes = [1, 2, 3];"
description: "const BOOL_TRUE: bool = true;\nconst BOOL_FALSE: bool = false;\nconst INT: u32 = 100;\nconst FLOAT: f64 = 5.5;\nconst STRING: string = \"value\";\nconst BYTES: bytes = [1, 2, 3];"
input_file: crates/stef-parser/tests/inputs/const_basic.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "const SIMPLE: string = \"value\";\n\nconst NEWLINE_ESCAPE: string = \"one \\\n two \\\n three\\\n\";\n\nconst ESCAPES: string = \"escape basics \\r\\n \\t \\b \\f \\\\ \\\"\\\n hello\\\" \\n\\\n unicode \\u{2764} \\\n emoji ❤ \\\n\";\n\nconst MULTILINE: string = \"a\n b\n c\n\";"
description: "const SIMPLE: string = \"value\";\n\nconst NEWLINE_ESCAPE: string = \"one \\\n two \\\n three\\\n\";\n\nconst ESCAPES: string = \"escape basics \\r\\n \\t \\b \\f \\\\ \\\"\\\n hello\\\" \\n\\\n unicode \\u{2764} \\\n emoji ❤ \\\n\";\n\nconst MULTILINE: string = \"a\n b\n c\n\";"
input_file: crates/stef-parser/tests/inputs/const_string.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Sample enum.\nenum Sample {\n One @1,\n /// Second variant\n Two(u32 @1, u64 @2) @2,\n Three {\n field1: u32 @1,\n /// Second field of third variant\n field2: bool @2,\n } @3,\n}"
description: "/// Sample enum.\nenum Sample {\n One @1,\n /// Second variant\n Two(u32 @1, u64 @2) @2,\n Three {\n field1: u32 @1,\n /// Second field of third variant\n field2: bool @2,\n } @3,\n}"
input_file: crates/stef-parser/tests/inputs/enum_basic.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Enum with generics.\nenum Sample<A, B, C, D> {\n One @1,\n Two(A @1, B @2) @2,\n Three {\n field1: C @1,\n field2: D @2,\n } @3,\n}"
description: "/// Enum with generics.\nenum Sample<A, B, C, D> {\n One @1,\n Two(A @1, B @2) @2,\n Three {\n field1: C @1,\n field2: D @2,\n } @3,\n}"
input_file: crates/stef-parser/tests/inputs/enum_generics.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Sample enum.\n enum Sample {\n\n One @1,\n\n Two ( u32 @1, u64 @2) @2,\n\n Three {\n\n field1: u32 @1,\n\n field2: bool @2,\n\n } @3,\n\n }"
description: "/// Sample enum.\n enum Sample {\n\n One @1,\n\n Two ( u32 @1, u64 @2) @2,\n\n Three {\n\n field1: u32 @1,\n\n field2: bool @2,\n\n } @3,\n\n }"
input_file: crates/stef-parser/tests/inputs/enum_many_ws.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "enum Sample<T>{One@1,Two(u32@1,u64@2,T@3)@2,Three{field1:u32@1,field2:bool@2,field3:T@3}@3}"
description: "enum Sample<T>{One@1,Two(u32@1,u64@2,T@3)@2,Three{field1:u32@1,field2:bool@2,field3:T@3}@3}"
input_file: crates/stef-parser/tests/inputs/enum_min_ws.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "use other::schema::Sample;\nuse second::submodule;"
description: "use other::schema::Sample;\nuse second::submodule;"
input_file: crates/stef-parser/tests/inputs/import_basic.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "mod a {\n /// Inner module\n mod b {\n enum Sample {\n One @1,\n }\n }\n\n struct Sample {\n value: u32 @1,\n }\n}"
description: "mod a {\n /// Inner module\n mod b {\n enum Sample {\n One @1,\n }\n }\n\n struct Sample {\n value: u32 @1,\n }\n}"
input_file: crates/stef-parser/tests/inputs/module_basic.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Basic struct.\nstruct SampleStruct {\n a: u32 @1,\n b: bool @2,\n}\n\n/// Sample enum.\nenum SampleEnum {\n One @1,\n Two(u32 @1, u64 @2) @2,\n Three {\n field1: u32 @1,\n field2: bool @2,\n } @3,\n}"
description: "/// Basic struct.\nstruct SampleStruct {\n a: u32 @1,\n b: bool @2,\n}\n\n/// Sample enum.\nenum SampleEnum {\n One @1,\n Two(u32 @1, u64 @2) @2,\n Three {\n field1: u32 @1,\n field2: bool @2,\n } @3,\n}"
input_file: crates/stef-parser/tests/inputs/schema_basic.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Basic struct.\nstruct Sample {\n a: u32 @1,\n /// Second field\n b: bool @2,\n}"
description: "/// Basic struct.\nstruct Sample {\n a: u32 @1,\n /// Second field\n b: bool @2,\n}"
input_file: crates/stef-parser/tests/inputs/struct_basic.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Generic key-value pair.\nstruct KeyValue<K, V> {\n key: K @1,\n value: V @2,\n}"
description: "/// Generic key-value pair.\nstruct KeyValue<K, V> {\n key: K @1,\n value: V @2,\n}"
input_file: crates/stef-parser/tests/inputs/struct_generics.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Some comment\n struct Sample<\n T\n > {\n\n a: u32 @1,\n b: bool @2,\n c: T @3,\n }"
description: "/// Some comment\n struct Sample<\n T\n > {\n\n a: u32 @1,\n b: bool @2,\n c: T @3,\n }"
input_file: crates/stef-parser/tests/inputs/struct_many_ws.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "struct Sample<T>{a:u32@1,b:bool@2,c:T@3}"
description: "struct Sample<T>{a:u32@1,b:bool@2,c:T@3}"
input_file: crates/stef-parser/tests/inputs/struct_min_ws.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Basic struct.\nstruct Sample(u32 @1, bool @2)"
description: "/// Basic struct.\nstruct Sample(u32 @1, bool @2)"
input_file: crates/stef-parser/tests/inputs/struct_tuple.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "struct Sample {\n f01: bool @1,\n f02: u8 @2,\n f03: u16 @3,\n f04: u32 @4,\n f05: u64 @5,\n f06: u128 @6,\n f07: i8 @7,\n f08: i16 @8,\n f09: i32 @9,\n f10: i64 @10,\n f11: i128 @11,\n f12: f32 @12,\n f13: f64 @13,\n f14: string @14,\n f15: &string @15,\n f16: bytes @16,\n f17: &bytes @17,\n f18: box<string> @18,\n f19: box<bytes> @19,\n f20: (u32, u32, u32) @20,\n f21: [u32; 12] @21,\n}"
description: "struct Sample {\n f01: bool @1,\n f02: u8 @2,\n f03: u16 @3,\n f04: u32 @4,\n f05: u64 @5,\n f06: u128 @6,\n f07: i8 @7,\n f08: i16 @8,\n f09: i32 @9,\n f10: i64 @10,\n f11: i128 @11,\n f12: f32 @12,\n f13: f64 @13,\n f14: string @14,\n f15: &string @15,\n f16: bytes @16,\n f17: &bytes @17,\n f18: box<string> @18,\n f19: box<bytes> @19,\n f20: (u32, u32, u32) @20,\n f21: [u32; 12] @21,\n}"
input_file: crates/stef-parser/tests/inputs/types_basic.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "struct Sample {\n f1: vec<u32> @1,\n f2: hash_map<u32, string> @2,\n f3: hash_set<u32> @3,\n f4: option<u32> @4,\n f5: non_zero<u32> @5,\n}"
description: "struct Sample {\n f1: vec<u32> @1,\n f2: hash_map<u32, string> @2,\n f3: hash_set<u32> @3,\n f4: option<u32> @4,\n f5: non_zero<u32> @5,\n}"
input_file: crates/stef-parser/tests/inputs/types_generic.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "struct Sample {\n value: vec<option<non_zero<hash_map<i64, box<string>>>>> @1,\n}"
description: "struct Sample {\n value: vec<option<non_zero<hash_map<i64, box<string>>>>> @1,\n}"
input_file: crates/stef-parser/tests/inputs/types_nested.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "struct Sample {\n f01: non_zero<u8> @1,\n f02: non_zero<u16> @2,\n f03: non_zero<u32> @3,\n f04: non_zero<u64> @4,\n f05: non_zero<u128> @5,\n f06: non_zero<i8> @6,\n f07: non_zero<i16> @7,\n f08: non_zero<i32> @8,\n f09: non_zero<i64> @9,\n f10: non_zero<i128> @10,\n f11: non_zero<string> @11,\n f12: non_zero<bytes> @12,\n f13: non_zero<vec<string>> @13,\n f14: non_zero<hash_map<string, bytes>> @14,\n f15: non_zero<hash_set<string>> @15,\n}"
description: "struct Sample {\n f01: non_zero<u8> @1,\n f02: non_zero<u16> @2,\n f03: non_zero<u32> @3,\n f04: non_zero<u64> @4,\n f05: non_zero<u128> @5,\n f06: non_zero<i8> @6,\n f07: non_zero<i16> @7,\n f08: non_zero<i32> @8,\n f09: non_zero<i64> @9,\n f10: non_zero<i128> @10,\n f11: non_zero<string> @11,\n f12: non_zero<bytes> @12,\n f13: non_zero<vec<string>> @13,\n f14: non_zero<hash_map<string, bytes>> @14,\n f15: non_zero<hash_set<string>> @15,\n}"
input_file: crates/stef-parser/tests/inputs/types_non_zero.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "struct Sample {\n basic: Test123 @1,\n with_generics: KeyValue<u32, bool> @2,\n}\n\nenum Test123 {\n Value @1,\n}\n\nstruct KeyValue<K, V> {\n key: K @1,\n value: V @2,\n}"
description: "struct Sample {\n basic: Test123 @1,\n with_generics: KeyValue<u32, bool> @2,\n}\n\nenum Test123 {\n Value @1,\n}\n\nstruct KeyValue<K, V> {\n key: K @1,\n value: V @2,\n}"
input_file: crates/stef-parser/tests/inputs/types_ref.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Hello world!\ntype Sample = String;"
description: "/// Hello world!\ntype Sample = String;"
input_file: crates/stef-build/tests/inputs_extra/alias.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// A bool.\nconst BOOL: bool = true;\n/// An integer.\nconst INT: u32 = 100;\n/// A float.\nconst FLOAT: f64 = 5.0;\n/// A string.\nconst STRING: string = \"hello\";\n/// Some bytes.\nconst BYTES: bytes = [1, 2, 3];"
description: "/// A bool.\nconst BOOL: bool = true;\n/// An integer.\nconst INT: u32 = 100;\n/// A float.\nconst FLOAT: f64 = 5.0;\n/// A string.\nconst STRING: string = \"hello\";\n/// Some bytes.\nconst BYTES: bytes = [1, 2, 3];"
input_file: crates/stef-build/tests/inputs_extra/const.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Hello world!\nenum Sample {\n Variant1 @1,\n Variant2(u32 @1, u8 @2) @2,\n Variant3 {\n field1: string @1,\n field2: vec<bool> @2,\n } @3,\n}"
description: "/// Hello world!\nenum Sample {\n Variant1 @1,\n Variant2(u32 @1, u8 @2) @2,\n Variant3 {\n field1: string @1,\n field2: vec<bool> @2,\n } @3,\n}"
input_file: crates/stef-build/tests/inputs_extra/enum.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "use other::module;\nuse other::module::Type;"
description: "use other::module;\nuse other::module::Type;"
input_file: crates/stef-build/tests/inputs_extra/import.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Hello world!\nmod sample {}"
description: "/// Hello world!\nmod sample {}"
input_file: crates/stef-build/tests/inputs_extra/module.stef
---
#[allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-build/tests/compiler.rs
expression: "/// Hello world!\nstruct Sample {\n field1: u32 @1,\n field2: bytes @2,\n field3: (bool, [i16; 4]) @3,\n}"
description: "/// Hello world!\nstruct Sample {\n field1: u32 @1,\n field2: bytes @2,\n field3: (bool, [i16; 4]) @3,\n}"
input_file: crates/stef-build/tests/inputs_extra/struct.stef
---
#[allow(unused_imports)]
Expand Down
15 changes: 8 additions & 7 deletions crates/stef-compiler/tests/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
fs,
};

use insta::{assert_snapshot, glob};
use insta::{assert_snapshot,with_settings, glob};
use miette::{Diagnostic, MietteHandler, MietteHandlerOpts, NamedSource, Report, ReportHandler};
use stef_parser::Schema;

Expand Down Expand Up @@ -32,13 +32,14 @@ fn compile_invalid_schema() {
let result = stef_compiler::validate_schema(name, &schema).unwrap_err();
let report = Report::new(result).with_source_code(NamedSource::new(
path.file_name().unwrap().to_string_lossy(),
input,
input.clone(),
));

assert_snapshot!(
"error",
Wrapper(&handler, &*report).to_string(),
stringify!(stef_compiler::validate_schema(&schema).unwrap_err())
);
with_settings!({
description => input.trim(),
omit_expression => true,
}, {
assert_snapshot!("error", Wrapper(&handler, &*report).to_string());
});
});
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "enum Sample<T, T> {\n One @1,\n Two { value: T @1 } @2,\n}"
input_file: crates/stef-compiler/tests/inputs/invalid/enum_gen_dup.stef
---
× invalid generic type found
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "enum Sample<T> {\n One @1,\n Two { value: string @1 } @2,\n}"
input_file: crates/stef-compiler/tests/inputs/invalid/enum_gen_unused.stef
---
× invalid generic type found
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "enum Sample {\n One @1,\n Two {\n field1: string @1,\n field2: string @1,\n } @2,\n}"
input_file: crates/stef-compiler/tests/inputs/invalid/enum_named_dup_id.stef
---
× duplicate ID found
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "enum Sample {\n One @1,\n Two {\n field: string @1,\n field: string @2,\n } @2,\n}"
input_file: crates/stef-compiler/tests/inputs/invalid/enum_named_dup_name.stef
---
× duplicate name found
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "enum Sample {\n One @1,\n Two(string @1, string @1) @2,\n}"
input_file: crates/stef-compiler/tests/inputs/invalid/enum_unnamed_dup_id.stef
---
× duplicate ID found
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "enum Sample {\n One @1,\n Two @1,\n}"
input_file: crates/stef-compiler/tests/inputs/invalid/enum_variant_dup_id.stef
---
× duplicate ID found
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "enum Sample {\n One @1,\n One @2,\n}"
input_file: crates/stef-compiler/tests/inputs/invalid/enum_variant_dup_name.stef
---
× duplicate name found
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "struct Sample {\n value: Other @1,\n}\n\nstruct Other<T>(T @1)"
input_file: crates/stef-compiler/tests/inputs/invalid/resolve_gens_mismatch.stef
---
× type resolution failed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "struct Sample {\n value: OTHER @1,\n}\n\nconst OTHER: u32 = 1;"
input_file: crates/stef-compiler/tests/inputs/invalid/resolve_kind_mismatch.stef
---
× type resolution failed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/stef-compiler/tests/compiler.rs
expression: "stef_compiler :: validate_schema(& schema).unwrap_err()"
description: "struct Sample {\n value: Other @1,\n}"
input_file: crates/stef-compiler/tests/inputs/invalid/resolve_root.stef
---
× type resolution failed
Expand Down
Loading

0 comments on commit 137d2cd

Please sign in to comment.