macro processor: add test of tuple index in @#for loop

[skip ci]
parent 133b77c0
......@@ -40,7 +40,15 @@ phi = 0.1;
@#define w = w + [ elt ]
@#endfor
@#if w != [ 1, "a", 1, 2:3]
@#error "For loop problem"
@#error "For loop problem 1"
@#endif
@#define w = [ ]
@#for (i,j) in [(1,2),(1,3),(1,4)]
@#define w = w + [i, j]
@#endfor
@#if w != [ 1, 2, 1, 3, 1, 4]
@#error "For loop problem 2"
@#endif
@#define s = "abcde"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment