Add annotated_body repl test

This commit is contained in:
Richard Feldman 2022-10-30 07:23:49 -04:00
parent 99f4d99771
commit c39ac00659
No known key found for this signature in database
GPG Key ID: F1F21AA5B1D9E43B

View File

@ -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();