| 3780 | |
| 3781 | #[test] |
| 3782 | fn test_conditional_expression() { |
| 3783 | { |
| 3784 | let test_case = &"a if b else c if d else e"; |
| 3785 | let mut parser = Parser::new(test_case); |
| 3786 | let program = parser.parse().expect("parsing failed"); |
| 3787 | |
| 3788 | insta::with_settings!({ |
| 3789 | description => test_case.to_string(), // the template source code |
| 3790 | snapshot_path => "../../test_data/output/", |
| 3791 | omit_expression => true // do not include the default expression |
| 3792 | }, { |
| 3793 | assert_debug_snapshot!(program); |
| 3794 | }); |
| 3795 | } |
| 3796 | } |
| 3797 | |
| 3798 | #[test] |
| 3799 | fn test_string_literal_concatnation() { |