Skip to content

Commit 4612b06

Browse files
committed
Fixed tests
1 parent b030843 commit 4612b06

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

test/interpreter_test.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void schema_2() {
116116
expect(
117117
interpreter
118118
.validateOnScheme(
119-
"PAINT({blue}, 4, square bottom left), GO(A3), PAINT({blue}, :, up), GO(right), PAINT({yellow}, :, up), GO(C5), PAINT({yellow}, 4, square bottom left)",
119+
"PAINT({blue}, 4, square right up left), GO(A3), PAINT({blue}, :, up), GO(right), PAINT({yellow}, :, up), GO(C5), PAINT({yellow}, 4, square right up left)",
120120
2)
121121
.first
122122
.completed,
@@ -142,7 +142,7 @@ void schema_2() {
142142
expect(
143143
interpreter
144144
.validateOnScheme(
145-
"PAINT({blue}, 4, square bottom left), GO(A3), PAINT({blue}, :, up), FILL_EMPTY(yellow)",
145+
"PAINT({blue}, 4, square right up left), GO(A3), PAINT({blue}, :, up), FILL_EMPTY(yellow)",
146146
2)
147147
.first
148148
.completed,
@@ -523,7 +523,7 @@ void other_schemas() {
523523
1);
524524
BasicShape expected = Cross.fromList([
525525
[0, 0, 1, 1, 0, 0],
526-
[0, 0, 0, 0, 0, 0],
526+
[0, 0, 1, 0, 0, 0],
527527
[0, 0, 0, 0, 0, 0],
528528
[0, 0, 0, 0, 0, 0],
529529
[0, 0, 1, 0, 0, 0],
@@ -574,15 +574,15 @@ void valid_patters() {
574574
test("", () {
575575
interpreter.reset();
576576
var response = interpreter.validateOnScheme(
577-
"paint({green},1,square bottom left),mirror(vertical),go(c4),paint({blue},1,square bottom left),mirror(vertical)",
577+
"paint({green},1,square right up left),mirror(vertical),go(c4),paint({blue},1,square right up left),mirror(vertical)",
578578
1);
579579
expect(response.first.completed, isFalse);
580580
expect(response.second, equals(CatError.none));
581581
});
582582
test("", () {
583583
interpreter.reset();
584584
var response = interpreter.validateOnScheme(
585-
"mirror({paint({green},1,square bottom left)},vertical),go(c4),mirror({paint({blue},1,square bottom left)},vertical)",
585+
"mirror({paint({green},1,square right up left)},vertical),go(c4),mirror({paint({blue},1,square right up left)},vertical)",
586586
1);
587587
expect(response.first.completed, isFalse);
588588
expect(response.second, equals(CatError.none));
@@ -605,7 +605,7 @@ void valid_patters() {
605605
test("", () {
606606
interpreter.reset();
607607
var response = interpreter.validateOnScheme(
608-
"paint({red},1,square bottom left),mirror({c1,d1},vertical)", 1);
608+
"paint({red},1,square right up left),mirror({c1,d1},vertical)", 1);
609609
expect(response.first.completed, isFalse);
610610
expect(response.second, equals(CatError.none));
611611
});
@@ -652,7 +652,7 @@ void valid_patters() {
652652
test("", () {
653653
interpreter.reset();
654654
var response = interpreter.validateOnScheme(
655-
"go(a4),mirror({mirror({paint({red,blue,yellow},3,up)},horizontal)},vertical),go(c1),mirror({paint({blue},1,square bottom left)},vertical)",
655+
"go(a4),mirror({mirror({paint({red,blue,yellow},3,up)},horizontal)},vertical),go(c1),mirror({paint({blue},1,square right up left)},vertical)",
656656
1);
657657
expect(response.first.completed, isFalse);
658658
expect(response.second, equals(CatError.none));
@@ -676,7 +676,7 @@ void valid_patters() {
676676
test("", () {
677677
interpreter.reset();
678678
var response = interpreter.validateOnScheme(
679-
"paint({yellow,red,yellow},:,right),go(up),paint({red,yellow,yellow},:,right),go(a3),paint({yellow,yellow,red},1,square bottom left),go(e3),paint({yellow,red,yellow,red},1,square bottom left)",
679+
"paint({yellow,red,yellow},:,right),go(up),paint({red,yellow,yellow},:,right),go(a3),paint({yellow,yellow,red},1,square right up left),go(e3),paint({yellow,red,yellow,red},1,square right up left)",
680680
1);
681681
expect(response.first.completed, isFalse);
682682
expect(response.second, equals(CatError.none));

test/simple_coloring_test.dart

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ void fillEmpty() {
246246
expect(
247247
board.getBoard,
248248
equals([
249+
[0, 0, 1, 1, 0, 0],
250+
[0, 0, 1, 1, 0, 0],
249251
[1, 1, 1, 1, 1, 1],
250252
[1, 1, 1, 1, 1, 1],
251-
[1, 1, 1, 1, 1, 1],
252-
[1, 1, 1, 1, 1, 1],
253-
[1, 1, 1, 1, 1, 1],
254-
[1, 1, 1, 1, 1, 1],
253+
[0, 0, 1, 1, 0, 0],
254+
[0, 0, 1, 1, 0, 0],
255255
]),
256256
);
257257
expect(board.move.column, equals(0));
@@ -264,12 +264,12 @@ void fillEmpty() {
264264
expect(
265265
board.getBoard,
266266
equals([
267-
[1, 1, 1, 1, 1, 1],
268-
[1, 1, 1, 1, 1, 1],
267+
[0, 0, 1, 1, 0, 0],
268+
[0, 0, 1, 1, 0, 0],
269269
[1, 1, 1, 1, 1, 1],
270270
[2, 2, 2, 2, 2, 2],
271-
[1, 1, 1, 1, 1, 1],
272-
[1, 1, 1, 1, 1, 1],
271+
[0, 0, 1, 1, 0, 0],
272+
[0, 0, 1, 1, 0, 0],
273273
]),
274274
);
275275
expect(board.move.column, equals(5));
@@ -283,12 +283,12 @@ void fillEmpty() {
283283
expect(
284284
board.getBoard,
285285
equals([
286-
[1, 1, 1, 1, 1, 1],
287-
[1, 1, 1, 3, 1, 1],
286+
[0, 0, 1, 1, 0, 0],
287+
[0, 0, 1, 3, 0, 0],
288288
[1, 1, 1, 3, 1, 1],
289289
[2, 2, 2, 3, 3, 3],
290-
[1, 1, 1, 1, 1, 1],
291-
[1, 1, 1, 1, 1, 1],
290+
[0, 0, 1, 1, 0, 0],
291+
[0, 0, 1, 1, 0, 0],
292292
]),
293293
);
294294
expect(board.move.column, equals(3));
@@ -299,7 +299,7 @@ void fillEmpty() {
299299
void square() {
300300
test("Color square from starting position", () {
301301
Coloring board = Coloring(Shape.cross.build);
302-
expect(board.squareBottomLeft([1]), isTrue);
302+
expect(board.squareRightUpLeft([1]), isTrue);
303303
expect(
304304
board.getBoard,
305305
equals([
@@ -316,7 +316,7 @@ void square() {
316316
});
317317
test("Color square from starting position alternate", () {
318318
Coloring board = Coloring(Shape.cross.build);
319-
expect(board.squareBottomLeft([1, 2]), isTrue);
319+
expect(board.squareRightUpLeft([1, 2]), isTrue);
320320
expect(
321321
board.getBoard,
322322
equals([
@@ -333,7 +333,7 @@ void square() {
333333
});
334334
test("Color square from starting position alternate", () {
335335
Coloring board = Coloring(Shape.cross.build);
336-
expect(board.squareBottomLeft([1, 2, 3]), isTrue);
336+
expect(board.squareRightUpLeft([1, 2, 3]), isTrue);
337337
expect(
338338
board.getBoard,
339339
equals([
@@ -350,7 +350,7 @@ void square() {
350350
});
351351
test("Color square from starting position alternate", () {
352352
Coloring board = Coloring(Shape.cross.build);
353-
expect(board.squareBottomLeft([1, 2, 3, 4]), isTrue);
353+
expect(board.squareRightUpLeft([1, 2, 3, 4]), isTrue);
354354
expect(
355355
board.getBoard,
356356
equals([
@@ -368,14 +368,14 @@ void square() {
368368
test("Color square from starting position alternate", () {
369369
Coloring board = Coloring(Shape.cross.build);
370370
expect(board.move.up(), isTrue);
371-
expect(board.squareBottomLeft([1, 2, 3, 4]), isFalse);
371+
expect(board.squareRightUpLeft([1, 2, 3, 4]), isFalse);
372372
expect(board.move.column, equals(0));
373373
expect(board.move.row, equals(2));
374374
});
375375
test("Color square from starting position alternate", () {
376376
Coloring board = Coloring(Shape.cross.build);
377377
expect(board.move.up(), isTrue);
378-
expect(board.squareTopLeft([1, 2, 3, 4]), isTrue);
378+
expect(board.squareDownRightUp([1, 2, 3, 4]), isTrue);
379379
expect(
380380
board.getBoard,
381381
equals([
@@ -393,7 +393,7 @@ void square() {
393393
test("Color square from starting position alternate", () {
394394
Coloring board = Coloring(Shape.cross.build);
395395
expect(board.move.right(), isTrue);
396-
expect(board.squareBottomRight([1, 2, 3, 4]), isTrue);
396+
expect(board.squareUpLeftDown([1, 2, 3, 4]), isTrue);
397397
expect(
398398
board.getBoard,
399399
equals([
@@ -411,7 +411,7 @@ void square() {
411411
test("Color square from starting position alternate", () {
412412
Coloring board = Coloring(Shape.cross.build);
413413
expect(board.move.diagonalUpRight(), isTrue);
414-
expect(board.squareTopRight([1, 2, 3, 4]), isTrue);
414+
expect(board.squareLeftDownRight([1, 2, 3, 4]), isTrue);
415415
expect(
416416
board.getBoard,
417417
equals([
@@ -429,7 +429,7 @@ void square() {
429429
test("Color square from starting position alternate", () {
430430
Coloring board = Coloring(Shape.cross.build);
431431
expect(board.move.diagonalUpRight(), isTrue);
432-
expect(board.squareBottomLeft([1, 2, 3, 4]), isFalse);
432+
expect(board.squareRightUpLeft([1, 2, 3, 4]), isFalse);
433433
expect(
434434
board.getBoard,
435435
equals([

0 commit comments

Comments
 (0)