()
| 4169 | |
| 4170 | #[test] |
| 4171 | fn test_for_incrementing() { |
| 4172 | let iter = VarRef::new("i", None); |
| 4173 | do_ok_test( |
| 4174 | "FOR i = 0 TO 5\nA\nB\nNEXT", |
| 4175 | &[Statement::For(ForSpan { |
| 4176 | iter: iter.clone(), |
| 4177 | iter_pos: lc(1, 5), |
| 4178 | iter_double: false, |
| 4179 | start: expr_integer(0, 1, 9), |
| 4180 | end: Expr::LessEqual(Box::from(BinaryOpSpan { |
| 4181 | lhs: expr_symbol(iter.clone(), 1, 5), |
| 4182 | rhs: expr_integer(5, 1, 14), |
| 4183 | pos: lc(1, 11), |
| 4184 | })), |
| 4185 | next: Expr::Add(Box::from(BinaryOpSpan { |
| 4186 | lhs: expr_symbol(iter, 1, 5), |
| 4187 | rhs: expr_integer(1, 1, 1), |
| 4188 | pos: lc(1, 11), |
| 4189 | })), |
| 4190 | body: vec![make_bare_builtin_call("A", 2, 1), make_bare_builtin_call("B", 3, 1)], |
| 4191 | })], |
| 4192 | ); |
| 4193 | } |
| 4194 | |
| 4195 | #[test] |
| 4196 | fn test_for_incrementing_with_step() { |
nothing calls this directly
no test coverage detected