Improve corpus tests

main
trivernis 2 months ago
parent a71af581e3
commit 58dcb2dbf4
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -0,0 +1,12 @@
let add2 a = a + 2
let multi_add2 l = {
let items = items l
add_all items 2
}
let basic_value = 10
let calculation = (1 * 1) + (2 * (2 + 3))
let calculation_with_fn fn = 1 * fn (2 * 2)

@ -22,3 +22,19 @@ type ShoppingList = #{
utils: Utils utils: Utils
packaging: Packaging packaging: Packaging
} }
type NestedHell = #[
NoNesting Num
Nesting #[
FirstLevel #[
SecondLevel #[
Third Lvl<a>
]
Second #{
first: Num
second: Num
}
]
StillFirst Num<a>
]
]

@ -13,3 +13,12 @@ fn it_parse_types() {
panic!("{e}") panic!("{e}")
} }
} }
#[test]
fn it_parse_declarations() {
let result = parse(include_str!("../../corpus/declarations.sk"));
if let Err(e) = result {
panic!("{e}")
}
}

Loading…
Cancel
Save