mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Add annotated_body repl test
This commit is contained in:
parent
99f4d99771
commit
c39ac00659
1 changed files with 15 additions and 0 deletions
|
@ -30,6 +30,21 @@ fn persisted_defs() {
|
|||
complete("val1 + x + y", &mut state, Ok(("15 : Num *", "val2")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn annotated_body() {
|
||||
let mut input = "t : [A, B, C]".to_string();
|
||||
|
||||
incomplete(&mut input);
|
||||
|
||||
input.push_str("t = A");
|
||||
|
||||
incomplete(&mut input);
|
||||
|
||||
let mut state = ReplState::new();
|
||||
|
||||
complete(&input, &mut state, Ok(("A : [A]*", "t")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn exhaustiveness_problem() {
|
||||
let mut input = "t : [A, B, C]".to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue