|
1 | | -pacmanRules.test.ex1 = let |
2 | | - Test.label.deprecated "eatGhost, ghost gets eaten" <| expect (eatGhost true true) |
| 1 | +pacmanRules.test.ex1 = verify do |
| 2 | + labeled "eatGhost, ghost gets eaten" do |
| 3 | + expected = true |
| 4 | + actual = eatGhost true true |
| 5 | + label "expected" expected |
| 6 | + label "actual" actual |
| 7 | + ensureEqual expected actual |
3 | 8 |
|
4 | | -pacmanRules.test.ex2 = let |
5 | | - Test.label.deprecated "eatGhost, ghost does not get eaten because no power pellet active" <| expect (eatGhost false true === false) |
| 9 | +pacmanRules.test.ex2 = verify do |
| 10 | + labeled "eatGhost, ghost does not get eaten because no power pellet active" do |
| 11 | + expected = false |
| 12 | + actual = eatGhost false true |
| 13 | + label "expected" expected |
| 14 | + label "actual" actual |
| 15 | + ensureEqual expected actual |
6 | 16 |
|
7 | | -pacmanRules.test.ex3 = let |
8 | | - Test.label.deprecated "eatGhost, ghost does not get eaten because not touching ghost" <| expect (eatGhost true false === false) |
| 17 | +pacmanRules.test.ex3 = verify do |
| 18 | + labeled "eatGhost, ghost does not get eaten because not touching ghost" do |
| 19 | + expected = false |
| 20 | + actual = eatGhost true false |
| 21 | + label "expected" expected |
| 22 | + label "actual" actual |
| 23 | + ensureEqual expected actual |
9 | 24 |
|
10 | | -pacmanRules.test.ex4 = let |
11 | | - Test.label.deprecated "score, score when eating dot" <| expect (score false true) |
| 25 | +pacmanRules.test.ex4 = verify do |
| 26 | + labeled "score, score when eating dot" do |
| 27 | + expected = true |
| 28 | + actual = score false true |
| 29 | + label "expected" expected |
| 30 | + label "actual" actual |
| 31 | + ensureEqual expected actual |
12 | 32 |
|
13 | | -pacmanRules.test.ex5 = let |
14 | | - Test.label.deprecated "score, score when eating power pellet" <| expect (score true false) |
| 33 | +pacmanRules.test.ex5 = verify do |
| 34 | + labeled "score, score when eating power pellet" do |
| 35 | + expected = true |
| 36 | + actual = score true false |
| 37 | + label "expected" expected |
| 38 | + label "actual" actual |
| 39 | + ensureEqual expected actual |
15 | 40 |
|
16 | | -pacmanRules.test.ex6 = let |
17 | | - Test.label.deprecated "score, no score when nothing eaten" <| expect (score false false === false ) |
| 41 | +pacmanRules.test.ex6 = verify do |
| 42 | + labeled "score, no score when nothing eaten" do |
| 43 | + expected = false |
| 44 | + actual = score false false |
| 45 | + label "expected" expected |
| 46 | + label "actual" actual |
| 47 | + ensureEqual expected actual |
18 | 48 |
|
19 | | -pacmanRules.test.ex7 = let |
20 | | - Test.label.deprecated "lose if touching a ghost without a power pellet active" <| expect (lose false true) |
| 49 | +pacmanRules.test.ex7 = verify do |
| 50 | + labeled "lose if touching a ghost without a power pellet active" do |
| 51 | + expected = true |
| 52 | + actual = lose false true |
| 53 | + label "expected" expected |
| 54 | + label "actual" actual |
| 55 | + ensureEqual expected actual |
21 | 56 |
|
22 | | -pacmanRules.test.ex8 = let |
23 | | - Test.label.deprecated "don't lose if touching a ghost with a power pellet active" <| expect (lose true true === false) |
| 57 | +pacmanRules.test.ex8 = verify do |
| 58 | + labeled "don't lose if touching a ghost with a power pellet active" do |
| 59 | + expected = false |
| 60 | + actual = lose true true |
| 61 | + label "expected" expected |
| 62 | + label "actual" actual |
| 63 | + ensureEqual expected actual |
24 | 64 |
|
25 | | -pacmanRules.test.ex9 = let |
26 | | - Test.label.deprecated "don't lose if not touching a ghost" <| expect (lose true false === false) |
| 65 | +pacmanRules.test.ex9 = verify do |
| 66 | + labeled "don't lose if not touching a ghost" do |
| 67 | + expected = false |
| 68 | + actual = lose true false |
| 69 | + label "expected" expected |
| 70 | + label "actual" actual |
| 71 | + ensureEqual expected actual |
27 | 72 |
|
28 | | -pacmanRules.test.ex10 = let |
29 | | - Test.label.deprecated "win if all dots eaten" <| expect (win true false false) |
| 73 | +pacmanRules.test.ex10 = verify do |
| 74 | + labeled "win if all dots eaten" do |
| 75 | + expected = true |
| 76 | + actual = win true false false |
| 77 | + label "expected" expected |
| 78 | + label "actual" actual |
| 79 | + ensureEqual expected actual |
30 | 80 |
|
31 | | -pacmanRules.test.ex11 = let |
32 | | - Test.label.deprecated "don't win if all dots eaten, but touching a ghost" <| expect (win true false true === false) |
| 81 | +pacmanRules.test.ex11 = verify do |
| 82 | + labeled "don't win if all dots eaten, but touching a ghost" do |
| 83 | + expected = false |
| 84 | + actual = win true false true |
| 85 | + label "expected" expected |
| 86 | + label "actual" actual |
| 87 | + ensureEqual expected actual |
33 | 88 |
|
34 | | -pacmanRules.test.ex12 = let |
35 | | - Test.label.deprecated "win if all dots eaten and touching a ghost with a power pellet active" <| expect (win true true true) |
| 89 | +pacmanRules.test.ex12 = verify do |
| 90 | + labeled "win if all dots eaten and touching a ghost with a power pellet active" do |
| 91 | + expected = true |
| 92 | + actual = win true true true |
| 93 | + label "expected" expected |
| 94 | + label "actual" actual |
| 95 | + ensureEqual expected actual |
36 | 96 |
|
37 | | -test> pacmanRules.tests = runAll [ |
| 97 | +test> pacmanRules.tests = join [ |
38 | 98 | pacmanRules.test.ex1, |
39 | 99 | pacmanRules.test.ex2, |
40 | 100 | pacmanRules.test.ex3, |
|
0 commit comments