Skip to content
Snippets Groups Projects
Verified Commit 2471a2e2 authored by Houtan Bastani's avatar Houtan Bastani Committed by Sébastien Villemot
Browse files

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

[skip ci]

(cherry picked from commit 71def361)
parent 9a4e7107
Branches
Tags
1 merge request!1815WIP Cherry-picks for 4.6
...@@ -40,7 +40,15 @@ phi = 0.1; ...@@ -40,7 +40,15 @@ phi = 0.1;
@#define w = w + [ elt ] @#define w = w + [ elt ]
@#endfor @#endfor
@#if w != [ 1, "a", 1, 2:3] @#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 @#endif
@#define s = "abcde" @#define s = "abcde"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment