mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Merge pull request #678 from rtfeldman/record-bool-tests
More REPL Improvements
This commit is contained in:
commit
d21ffb7eee
5 changed files with 472 additions and 212 deletions
|
@ -820,4 +820,28 @@ mod gen_records {
|
|||
i64
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn booleans_in_record() {
|
||||
assert_evals_to!(
|
||||
indoc!("{ x: 1 == 1, y: 1 == 1 }"),
|
||||
(true, true),
|
||||
(bool, bool)
|
||||
);
|
||||
assert_evals_to!(
|
||||
indoc!("{ x: 1 != 1, y: 1 == 1 }"),
|
||||
(false, true),
|
||||
(bool, bool)
|
||||
);
|
||||
assert_evals_to!(
|
||||
indoc!("{ x: 1 == 1, y: 1 != 1 }"),
|
||||
(true, false),
|
||||
(bool, bool)
|
||||
);
|
||||
assert_evals_to!(
|
||||
indoc!("{ x: 1 != 1, y: 1 != 1 }"),
|
||||
(false, false),
|
||||
(bool, bool)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -936,7 +936,7 @@ fn get_recursion_var(subs: &Subs, var: Variable) -> Option<Variable> {
|
|||
}
|
||||
}
|
||||
|
||||
fn union_sorted_tags_help<'a>(
|
||||
pub fn union_sorted_tags_help<'a>(
|
||||
arena: &'a Bump,
|
||||
mut tags_vec: std::vec::Vec<(TagName, std::vec::Vec<Variable>)>,
|
||||
opt_rec_var: Option<Variable>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue