@@ -116,8 +116,8 @@ void schema_2() {
116116 expect (
117117 interpreter
118118 .validateOnScheme (
119- "PAINT({blue}, 4, square), GO(A3), PAINT({blue}, :, up), GO(right), PAINT({yellow}, :, up), GO(C5), PAINT({yellow}, 4, square)" ,
120- 2 )
119+ "PAINT({blue}, 4, square), GO(A3), PAINT({blue}, :, up), GO(right), PAINT({yellow}, :, up), GO(C5), PAINT({yellow}, 4, square)" ,
120+ 2 )
121121 .first
122122 .completed,
123123 isTrue);
@@ -142,8 +142,8 @@ void schema_2() {
142142 expect (
143143 interpreter
144144 .validateOnScheme (
145- "PAINT({blue}, 4, square), GO(A3), PAINT({blue}, :, up), FILL_EMPTY(yellow)" ,
146- 2 )
145+ "PAINT({blue}, 4, square), GO(A3), PAINT({blue}, :, up), FILL_EMPTY(yellow)" ,
146+ 2 )
147147 .first
148148 .completed,
149149 isTrue);
@@ -168,8 +168,8 @@ void schema_2() {
168168 expect (
169169 interpreter
170170 .validateOnScheme (
171- "PAINT({blue}, 2, right), GO(D1), PAINT({blue}, 2, right), GO(F3), PAINT({blue})" ,
172- 2 )
171+ "PAINT({blue}, 2, right), GO(D1), PAINT({blue}, 2, right), GO(F3), PAINT({blue})" ,
172+ 2 )
173173 .first
174174 .completed,
175175 isFalse);
@@ -202,8 +202,8 @@ void schema_3() {
202202 expect (
203203 interpreter
204204 .validateOnScheme (
205- "PAINT({yellow}), GO(down), PAINT({yellow}), GO(diagonal up right), PAINT({red}), GO(down), PAINT({red}), GO(F3), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(F4), PAINT({red}), GO(down), PAINT({red}), GO(down), PAINT({red}), GO(down), PAINT({red}), GO(down), PAINT({red}), GO(down), PAINT({red}), GO(D5), PAINT({yellow}), GO(down), PAINT({yellow}), GO(diagonal up right), PAINT({red}), GO(down), PAINT({red})" ,
206- 3 )
205+ "PAINT({yellow}), GO(down), PAINT({yellow}), GO(diagonal up right), PAINT({red}), GO(down), PAINT({red}), GO(F3), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(F4), PAINT({red}), GO(down), PAINT({red}), GO(down), PAINT({red}), GO(down), PAINT({red}), GO(down), PAINT({red}), GO(down), PAINT({red}), GO(D5), PAINT({yellow}), GO(down), PAINT({yellow}), GO(diagonal up right), PAINT({red}), GO(down), PAINT({red})" ,
206+ 3 )
207207 .first
208208 .completed,
209209 isFalse);
@@ -228,8 +228,8 @@ void schema_3() {
228228 expect (
229229 interpreter
230230 .validateOnScheme (
231- "PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down), GO(F3), PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down), GO(D5), PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down)" ,
232- 3 )
231+ "PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down), GO(F3), PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down), GO(D5), PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down)" ,
232+ 3 )
233233 .first
234234 .completed,
235235 isTrue);
@@ -254,8 +254,8 @@ void schema_3() {
254254 expect (
255255 interpreter
256256 .validateOnScheme (
257- "COPY({PAINT({yellow}, :, down)}, {D1, F3, D5}) COPY({PAINT({red}, :, down)}, {D2, F4, D6})" ,
258- 3 )
257+ "COPY({PAINT({yellow}, :, down)}, {D1, F3, D5}) COPY({PAINT({red}, :, down)}, {D2, F4, D6})" ,
258+ 3 )
259259 .first
260260 .completed,
261261 isTrue);
@@ -280,8 +280,8 @@ void schema_3() {
280280 expect (
281281 interpreter
282282 .validateOnScheme (
283- "PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(D1), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(F3), PAINT({yellow}), GO(right), PAINT({red}), GO(diagonal down left), PAINT({yellow}), GO(right), PAINT({red}), GO(B3), PAINT({yellow}), GO(right), PAINT({red}), GO(diagonal down left), PAINT({yellow}), GO(right), PAINT({red})" ,
284- 3 )
283+ "PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(D1), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(F3), PAINT({yellow}), GO(right), PAINT({red}), GO(diagonal down left), PAINT({yellow}), GO(right), PAINT({red}), GO(B3), PAINT({yellow}), GO(right), PAINT({red}), GO(diagonal down left), PAINT({yellow}), GO(right), PAINT({red})" ,
284+ 3 )
285285 .first
286286 .completed,
287287 isTrue);
@@ -306,8 +306,8 @@ void schema_3() {
306306 expect (
307307 interpreter
308308 .validateOnScheme (
309- "GO(D6), PAINT({red}, :, down), GO(left), PAINT({yellow}, :, down), GO(F4), PAINT({red}, :, down), GO(left), PAINT({yellow}, :, down), GO(D2), PAINT({red}, :, down), GO(left), PAINT({yellow}, :, down)" ,
310- 3 )
309+ "GO(D6), PAINT({red}, :, down), GO(left), PAINT({yellow}, :, down), GO(F4), PAINT({red}, :, down), GO(left), PAINT({yellow}, :, down), GO(D2), PAINT({red}, :, down), GO(left), PAINT({yellow}, :, down)" ,
310+ 3 )
311311 .first
312312 .completed,
313313 isTrue);
@@ -340,8 +340,8 @@ void schema_4() {
340340 expect (
341341 interpreter
342342 .validateOnScheme (
343- "PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}), GO(D1), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}), GO(F3), PAINT({blue}), GO(down), PAINT({blue}), GO(down), PAINT({blue}), GO(down), PAINT({blue}), GO(down), PAINT({blue}), GO(down), PAINT({blue}), GO(F4), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow})" ,
344- 4 )
343+ "PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}), GO(D1), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}), GO(right), PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}), GO(F3), PAINT({blue}), GO(down), PAINT({blue}), GO(down), PAINT({blue}), GO(down), PAINT({blue}), GO(down), PAINT({blue}), GO(down), PAINT({blue}), GO(F4), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow}), GO(down), PAINT({yellow})" ,
344+ 4 )
345345 .first
346346 .completed,
347347 isTrue);
@@ -366,8 +366,8 @@ void schema_4() {
366366 expect (
367367 interpreter
368368 .validateOnScheme (
369- "PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down), GO(F3), PAINT({blue}, :, down), GO(right), PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down), GO(right), PAINT({blue}, :, down)" ,
370- 4 )
369+ "PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down), GO(F3), PAINT({blue}, :, down), GO(right), PAINT({yellow}, :, down), GO(right), PAINT({red}, :, down), GO(right), PAINT({blue}, :, down)" ,
370+ 4 )
371371 .first
372372 .completed,
373373 isFalse);
@@ -392,8 +392,8 @@ void schema_4() {
392392 expect (
393393 interpreter
394394 .validateOnScheme (
395- "COPY({PAINT({yellow}, :, up), GO(right), PAINT({red}, :, up), GO(right), PAINT({blue}, :, up)}, {C1, A4})" ,
396- 4 )
395+ "COPY({PAINT({yellow}, :, up), GO(right), PAINT({red}, :, up), GO(right), PAINT({blue}, :, up)}, {C1, A4})" ,
396+ 4 )
397397 .first
398398 .completed,
399399 isTrue);
@@ -418,8 +418,8 @@ void schema_4() {
418418 expect (
419419 interpreter
420420 .validateOnScheme (
421- "COPY({PAINT({yellow}, :, up), GO(right), PAINT({red}, :, up), GO(right), PAINT({blue}, :, up)}, {C1, A4})" ,
422- 4 )
421+ "COPY({PAINT({yellow}, :, up), GO(right), PAINT({red}, :, up), GO(right), PAINT({blue}, :, up)}, {C1, A4})" ,
422+ 4 )
423423 .first
424424 .completed,
425425 isTrue);
@@ -452,8 +452,8 @@ void other_schemas() {
452452 expect (
453453 interpreter
454454 .validateOnScheme (
455- "GO(up) PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}, 3, up), MIRROR(horizontal) MIRROR(vertical)" ,
456- 1 )
455+ "GO(up) PAINT({yellow}), GO(right), PAINT({red}), GO(right), PAINT({blue}, 3, up), MIRROR(horizontal) MIRROR(vertical)" ,
456+ 1 )
457457 .first
458458 .completed,
459459 isTrue);
@@ -636,6 +636,14 @@ void valid_patters() {
636636 expect (response.first.completed, isFalse);
637637 expect (response.second, equals (CatError .none));
638638 });
639+ test ("" , () {
640+ interpreter.reset ();
641+ var response = interpreter.validateOnScheme (
642+ "copy({paint({blue},:,right),go(up),paint({blue},:,right)},{c1,a3,e3})" ,
643+ 1 );
644+ expect (response.first.completed, isTrue);
645+ expect (response.second, equals (CatError .none));
646+ });
639647 });
640648}
641649
0 commit comments