-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from exercism/concept-exercises-test-upgrades
[concept-exercises-test-upgrades]: Updated tests in the concept exercises using not deprecated functionality.
- Loading branch information
Showing
4 changed files
with
125 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
[ | ||
{ | ||
"name": "lasagna.test.ex1", | ||
"test_code": "let\n Test.expect (expectedMinutesInOven === 40)" | ||
"name": "expected minutes in oven", | ||
"test_code": "verify do\n labeled \"expected minutes in oven\" do\n expected = 40\n label \"expected\" expected\n label \"actual\" expectedMinutesInOven\n ensureEqual expected expectedMinutesInOven" | ||
}, | ||
{ | ||
"name": "lasagna.test.ex2", | ||
"test_code": "let\n Test.expect (preparationTimeInMinutes 5 === 10)" | ||
"name": "preparation time in minutes", | ||
"test_code": "verify do\n labeled \"preparation time in minutes\" do\n expected = 10\n actual = preparationTimeInMinutes 5\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "lasagna.test.ex3", | ||
"test_code": "let\n Test.expect (elapsedTimeInMinutes 3 20 === 26)" | ||
"name": "elapsed time in minutes", | ||
"test_code": "verify do\n labeled \"elapsed time in minutes\" do\n expected = 26\n actual = elapsedTimeInMinutes 3 20\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
} | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
[ | ||
{ | ||
"name": "eatGhost, ghost gets eaten", | ||
"test_code": "let\n Test.label.deprecated \"eatGhost, ghost gets eaten\" <| expect (eatGhost true true)" | ||
"test_code": "verify do\n labeled \"eatGhost, ghost gets eaten\" do\n expected = true\n actual = eatGhost true true\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "eatGhost, ghost does not get eaten because no power pellet active", | ||
"test_code": "let\n Test.label.deprecated \"eatGhost, ghost does not get eaten because no power pellet active\" <| expect (eatGhost false true === false)" | ||
"test_code": "verify do\n labeled \"eatGhost, ghost does not get eaten because no power pellet active\" do\n expected = false\n actual = eatGhost false true\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "eatGhost, ghost does not get eaten because not touching ghost", | ||
"test_code": "let\n Test.label.deprecated \"eatGhost, ghost does not get eaten because not touching ghost\" <| expect (eatGhost true false === false)" | ||
"test_code": "verify do\n labeled \"eatGhost, ghost does not get eaten because not touching ghost\" do\n expected = false\n actual = eatGhost true false\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "score, score when eating dot", | ||
"test_code": "let\n Test.label.deprecated \"score, score when eating dot\" <| expect (score false true)" | ||
"test_code": "verify do\n labeled \"score, score when eating dot\" do\n expected = true\n actual = score false true\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "score, score when eating power pellet", | ||
"test_code": "let\n Test.label.deprecated \"score, score when eating power pellet\" <| expect (score true false)" | ||
"test_code": "verify do\n labeled \"score, score when eating power pellet\" do\n expected = true\n actual = score true false\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "score, no score when nothing eaten", | ||
"test_code": "let\n Test.label.deprecated \"score, no score when nothing eaten\" <| expect (score false false === false )" | ||
"test_code": "verify do\n labeled \"score, no score when nothing eaten\" do\n expected = false\n actual = score false false\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "lose if touching a ghost without a power pellet active", | ||
"test_code": "let\n Test.label.deprecated \"lose if touching a ghost without a power pellet active\" <| expect (lose false true)" | ||
"test_code": "verify do\n labeled \"lose if touching a ghost without a power pellet active\" do\n expected = true\n actual = lose false true\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "don't lose if touching a ghost with a power pellet active", | ||
"test_code": "let\n Test.label.deprecated \"don't lose if touching a ghost with a power pellet active\" <| expect (lose true true === false)" | ||
"test_code": "verify do\n labeled \"don't lose if touching a ghost with a power pellet active\" do\n expected = false\n actual = lose true true\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "don't lose if not touching a ghost", | ||
"test_code": "let\n Test.label.deprecated \"don't lose if not touching a ghost\" <| expect (lose true false === false)" | ||
"test_code": "verify do\n labeled \"don't lose if not touching a ghost\" do\n expected = false\n actual = lose true false\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "win if all dots eaten", | ||
"test_code": "let\n Test.label.deprecated \"win if all dots eaten\" <| expect (win true false false)" | ||
"test_code": "verify do\n labeled \"win if all dots eaten\" do\n expected = true\n actual = win true false false\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "don't win if all dots eaten, but touching a ghost", | ||
"test_code": "let\n Test.label.deprecated \"don't win if all dots eaten, but touching a ghost\" <| expect (win true false true === false)" | ||
"test_code": "verify do\n labeled \"don't win if all dots eaten, but touching a ghost\" do\n expected = false\n actual = win true false true\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
}, | ||
{ | ||
"name": "win if all dots eaten and touching a ghost with a power pellet active", | ||
"test_code": "let\n Test.label.deprecated \"win if all dots eaten and touching a ghost with a power pellet active\" <| expect (win true true true)" | ||
"test_code": "verify do\n labeled \"win if all dots eaten and touching a ghost with a power pellet active\" do\n expected = true\n actual = win true true true\n label \"expected\" expected\n label \"actual\" actual\n ensureEqual expected actual" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters