| 3537 | |
| 3538 | #[test] |
| 3539 | fn parse_yield_statement() { |
| 3540 | for test_case in &["yield", "yield a", "yield a, b", "yield a, b, "] { |
| 3541 | let mut parser = Parser::new(test_case); |
| 3542 | let program = parser.parse().expect("parsing failed"); |
| 3543 | |
| 3544 | insta::with_settings!({ |
| 3545 | description => test_case.to_string(), // the template source code |
| 3546 | snapshot_path => "../../test_data/output/", |
| 3547 | omit_expression => true // do not include the default expression |
| 3548 | }, { |
| 3549 | assert_debug_snapshot!(program); |
| 3550 | }); |
| 3551 | } |
| 3552 | } |
| 3553 | |
| 3554 | #[test] |
| 3555 | fn test_raise_statement() { |