Skip to content

Commit bd7b77b

Browse files
authored
triangle: Add new test case for scalene triangles to solve a bug [#2072] (#2075)
* Add new test case for scalene triangles [#2072] - Added new test case "two unadjacent sides are equal" of [3, 4, 3] for scalene triangles to solve a bug discussed in #2072 - New test case does not have a uuid yet - The existing scalene triangle test case "two sides are equal" is changed to "two adjacent sides are equal" to distinguish it from the newly added test case * Add uuid to new test case * Change scalene triangles' test cases' name * Add another scalene test case for redundancy Added the test case "second and third sides are equal" to prevent other possible bugs. * Correct mistake on "second and third sides are equal" test
1 parent 24a7bfa commit bd7b77b

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

exercises/triangle/canonical-data.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,31 @@
184184
},
185185
{
186186
"uuid": "c6e15a92-90d9-4fb3-90a2-eef64f8d3e1e",
187-
"description": "two sides are equal",
187+
"description": "first and second sides are equal",
188188
"property": "scalene",
189189
"input": {
190190
"sides": [4, 4, 3]
191191
},
192192
"expected": false
193193
},
194+
{
195+
"uuid": "3da23a91-a166-419a-9abf-baf4868fd985",
196+
"description": "first and third sides are equal",
197+
"property": "scalene",
198+
"input": {
199+
"sides": [3, 4, 3]
200+
},
201+
"expected": false
202+
},
203+
{
204+
"uuid": "b6a75d98-1fef-4c42-8e9a-9db854ba0a4d",
205+
"description": "second and third sides are equal",
206+
"property": "scalene",
207+
"input": {
208+
"sides": [4, 3, 3]
209+
},
210+
"expected": false
211+
},
194212
{
195213
"uuid": "70ad5154-0033-48b7-af2c-b8d739cd9fdc",
196214
"description": "may not violate triangle inequality",

0 commit comments

Comments
 (0)