|
| 1 | +secretHandshake.commands.tests.ex1 = |
| 2 | + expect ([Wink] === secretHandshake.commands 1) |
| 3 | + |> Test.label "wink for 1" |
| 4 | + |
| 5 | +secretHandshake.commands.tests.ex2 = |
| 6 | + expect ([DoubleBlink] === secretHandshake.commands 2) |
| 7 | + |> Test.label "double blink for 10" |
| 8 | + |
| 9 | +secretHandshake.commands.tests.ex3 = |
| 10 | + expect ([CloseYourEyes] === secretHandshake.commands 4) |
| 11 | + |> Test.label "close your eyes for 100" |
| 12 | + |
| 13 | +secretHandshake.commands.tests.ex4 = |
| 14 | + expect ([Jump] === secretHandshake.commands 8) |
| 15 | + |> Test.label "jump for 1000" |
| 16 | + |
| 17 | +secretHandshake.commands.tests.ex5 = |
| 18 | + expect ([Wink, DoubleBlink] === secretHandshake.commands 3) |
| 19 | + |> Test.label "combine two actions" |
| 20 | + |
| 21 | +secretHandshake.commands.tests.ex6 = |
| 22 | + expect ([DoubleBlink, Wink] === secretHandshake.commands 19) |
| 23 | + |> Test.label "reverse two actions" |
| 24 | + |
| 25 | +secretHandshake.commands.tests.ex7 = |
| 26 | + expect ([Jump] === secretHandshake.commands 24) |
| 27 | + |> Test.label "reversing one action gives the same action" |
| 28 | + |
| 29 | +secretHandshake.commands.tests.ex8 = |
| 30 | + expect ([] === secretHandshake.commands 16) |
| 31 | + |> Test.label "reversing no actions still gives no actions" |
| 32 | + |
| 33 | +secretHandshake.commands.tests.ex9 = |
| 34 | + expect ([Wink, DoubleBlink, CloseYourEyes, Jump] === secretHandshake.commands 15) |
| 35 | + |> Test.label "all possible actions" |
| 36 | + |
| 37 | +secretHandshake.commands.tests.ex10 = |
| 38 | + expect ([Jump, CloseYourEyes, DoubleBlink, Wink] === secretHandshake.commands 31) |
| 39 | + |> Test.label "reverse all possible actions" |
| 40 | + |
| 41 | +secretHandshake.commands.tests.ex11 = |
| 42 | + expect ([] === secretHandshake.commands 0) |
| 43 | + |> Test.label "do nothing for zero" |
| 44 | + |
| 45 | +test> secretHandshake.tests = runAll [ |
| 46 | + secretHandshake.commands.tests.ex1, |
| 47 | + secretHandshake.commands.tests.ex2, |
| 48 | + secretHandshake.commands.tests.ex3, |
| 49 | + secretHandshake.commands.tests.ex4, |
| 50 | + secretHandshake.commands.tests.ex5, |
| 51 | + secretHandshake.commands.tests.ex6, |
| 52 | + secretHandshake.commands.tests.ex7, |
| 53 | + secretHandshake.commands.tests.ex8, |
| 54 | + secretHandshake.commands.tests.ex9, |
| 55 | + secretHandshake.commands.tests.ex10, |
| 56 | + secretHandshake.commands.tests.ex11 |
| 57 | +] |
0 commit comments