mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
added gen test
This commit is contained in:
parent
f82ca36b19
commit
dfd14f8e49
2 changed files with 31 additions and 0 deletions
|
@ -159,3 +159,33 @@ fn err_empty_tag_union() {
|
||||||
i64
|
i64
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(any(feature = "gen-llvm"))]
|
||||||
|
fn is_ok() {
|
||||||
|
assert_evals_to!(
|
||||||
|
indoc!(
|
||||||
|
r#"
|
||||||
|
result : Result I64 {}
|
||||||
|
result = Ok 2
|
||||||
|
|
||||||
|
Result.isOk result
|
||||||
|
"#
|
||||||
|
),
|
||||||
|
true,
|
||||||
|
bool
|
||||||
|
);
|
||||||
|
|
||||||
|
assert_evals_to!(
|
||||||
|
indoc!(
|
||||||
|
r#"
|
||||||
|
result : Result I64 {}
|
||||||
|
result = Err {}
|
||||||
|
|
||||||
|
Result.isOk result
|
||||||
|
"#
|
||||||
|
),
|
||||||
|
false,
|
||||||
|
bool
|
||||||
|
);
|
||||||
|
}
|
|
@ -12,6 +12,7 @@ pub mod gen_primitives;
|
||||||
pub mod gen_records;
|
pub mod gen_records;
|
||||||
pub mod gen_set;
|
pub mod gen_set;
|
||||||
pub mod gen_str;
|
pub mod gen_str;
|
||||||
|
pub mod gen_result;
|
||||||
pub mod gen_tags;
|
pub mod gen_tags;
|
||||||
mod helpers;
|
mod helpers;
|
||||||
pub mod wasm_str;
|
pub mod wasm_str;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue