Performs a test of a uniline if statement followed by a specific allowed statement type. `text` is the literal statement to append to the if statement, and `stmt` contains the expected parsed statement. The expected positions for the parsed statement are line 1 and columns offset by 11 characters.
(text: &str, stmt: Statement)
| 4003 | /// expected parsed statement. The expected positions for the parsed statement are line 1 and |
| 4004 | /// columns offset by 11 characters. |
| 4005 | fn do_if_uniline_allowed_test(text: &str, stmt: Statement) { |
| 4006 | do_ok_test( |
| 4007 | &format!("IF 1 THEN {}\nZ", text), |
| 4008 | &[ |
| 4009 | Statement::If(IfSpan { |
| 4010 | branches: vec![IfBranchSpan { guard: expr_integer(1, 1, 4), body: vec![stmt] }], |
| 4011 | }), |
| 4012 | make_bare_builtin_call("Z", 2, 1), |
| 4013 | ], |
| 4014 | ); |
| 4015 | } |
| 4016 | |
| 4017 | #[test] |
| 4018 | fn test_if_uniline_allowed_data() { |