18 lines
223 B
Rust
18 lines
223 B
Rust
|
use dust_lang::*;
|
||
|
|
||
|
#[test]
|
||
|
fn define_enum() {
|
||
|
interpret(
|
||
|
"
|
||
|
enum FooBar(F) {
|
||
|
Foo(F),
|
||
|
Bar,
|
||
|
}
|
||
|
|
||
|
foo = FooBar::Foo(1)
|
||
|
foo
|
||
|
",
|
||
|
)
|
||
|
.unwrap();
|
||
|
}
|