| 3489 | |
| 3490 | #[test] |
| 3491 | fn test_parse_assert_stmt() { |
| 3492 | for test_case in &["assert a", "assert a, b", "assert True, 'fancy message'"] { |
| 3493 | let mut parser = Parser::new(test_case); |
| 3494 | let program = parser.parse().expect("parsing failed"); |
| 3495 | |
| 3496 | insta::with_settings!({ |
| 3497 | description => test_case.to_string(), // the template source code |
| 3498 | snapshot_path => "../../test_data/output/", |
| 3499 | omit_expression => true // do not include the default expression |
| 3500 | }, { |
| 3501 | assert_debug_snapshot!(program); |
| 3502 | }); |
| 3503 | } |
| 3504 | } |
| 3505 | |
| 3506 | #[test] |
| 3507 | fn test_pass_stmt() { |