1
0
dust/dust-lang/tests/enums.rs

24 lines
431 B
Rust
Raw Normal View History

2024-06-19 14:48:22 +00:00
use dust_lang::{identifier::Identifier, *};
#[test]
fn simple_enum() {
assert_eq!(
interpret(
"test",
"
type FooBar = enum {
Foo,
Bar,
}
FooBar::Foo
"
),
Ok(Some(Value::enum_instance(
Identifier::new("FooBar"),
Identifier::new("Foo"),
None
)))
);
}