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

[skip ci]
time-shift
Houtan Bastani 2020-02-14 17:28:19 +01:00
parent 133b77c061
commit 71def361fb
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 9 additions and 1 deletions

View File

@ -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"