This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check syntax no more explicitly need to call assertXXX
- Loading branch information
1 parent
5d3c07a
commit 2ac3ae3
Showing
12 changed files
with
190 additions
and
57 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
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,15 +1,15 @@ | ||
glob expected_area = 78.53981633974483; | ||
|
||
test a1 { | ||
check assertAlmostEqual(calculate_area(RAD), expected_area); | ||
check almostEqual(calculate_area(RAD), expected_area); | ||
} | ||
|
||
test a2 { | ||
c = Circle(RAD); | ||
check assertAlmostEqual(c.area(), expected_area); | ||
check almostEqual(c.area(), expected_area); | ||
} | ||
|
||
test a3 { | ||
c = Circle(RAD); | ||
check assertEqual(c.shape_type, ShapeType.CIRCLE); | ||
check c.shape_type == ShapeType.CIRCLE; | ||
} |
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,17 +1,17 @@ | ||
glob a = 5, b = 2; | ||
|
||
test test1 { | ||
check assertAlmostEqual(a, 6); | ||
check almostEqual(a, 6); | ||
} | ||
|
||
test test2 { | ||
check assertTrue(a != b); | ||
check a != b; | ||
} | ||
|
||
test test3 { | ||
check assertIn("d", "abc"); | ||
check "d" in "abc"; | ||
} | ||
|
||
test test4 { | ||
check assertEqual(a - b, 3); | ||
check a - b == 3; | ||
} |
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
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
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,15 +1,15 @@ | ||
glob expected_area = 78.53981633974483; | ||
|
||
test a1 { | ||
check assertAlmostEqual(calculate_area(RAD), expected_area); | ||
check almostEqual(calculate_area(RAD), expected_area); | ||
} | ||
|
||
test a2 { | ||
c = Circle(RAD); | ||
check assertAlmostEqual(c.area(), expected_area); | ||
check almostEqual(c.area(), expected_area); | ||
} | ||
|
||
test a3 { | ||
c = Circle(RAD); | ||
check assertEqual(c.shape_type, ShapeType.CIRCLE); | ||
check c.shape_type == ShapeType.CIRCLE; | ||
} |
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,17 +1,17 @@ | ||
glob x = 5, y = 2; | ||
|
||
test a { | ||
check assertAlmostEqual(5, x); | ||
check almostEqual(5, x); | ||
} | ||
|
||
test b { | ||
check assertIn("l", "llm"); | ||
check "l" in "llm"; | ||
} | ||
|
||
test c { | ||
check assertEqual(x - y, 3); | ||
check x - y == 3; | ||
} | ||
|
||
test d { | ||
check assertEqual(1, 2); | ||
check 1 == 2; | ||
} |
Oops, something went wrong.