diff options
Diffstat (limited to 'rust/src/web.rs')
| -rw-r--r-- | rust/src/web.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/rust/src/web.rs b/rust/src/web.rs index de87ad6..8fa9452 100644 --- a/rust/src/web.rs +++ b/rust/src/web.rs @@ -465,6 +465,30 @@ mod app_tests { } #[test] + async fn client_generates_application_with_lambda_terms_at_level_7() { + let mut client = client(); + client.grade = 7; + + let (input, _) = client.generate_expr(); + + let parsed = parse(&input); + match &parsed[..] { + [Value::App(t1, _)] if matches!(**t1, Value::Lam(_, _)) => (), + _ => panic!("Expected symbol, got {:?}", parsed), + } + } + + #[test] + async fn client_generates_applications_with_more_than_2_terms_at_level_8() { + let mut client = client(); + client.grade = 8; + + let (input, _) = client.generate_expr(); + + assert!(input.split(' ').count() > 2); + } + + #[test] async fn client_increases_grade_on_successful_test() { let mut client = client(); let expected = "1".to_string(); |
