Triangle: Update tests to check properties, not types#424
Merged
IanWhitney merged 3 commits intoexercism:masterfrom Oct 26, 2016
Merged
Triangle: Update tests to check properties, not types#424IanWhitney merged 3 commits intoexercism:masterfrom
IanWhitney merged 3 commits intoexercism:masterfrom
Conversation
As discussed here: exercism#379 Converts the tests so that they are checking the property of a triangle and not its type (or type stand-in like symbol/atom/etc.). I've removed some duplicative tests, but I believe I've still covered all the edge cases that were part of the old test suite.
Insti
reviewed
Oct 23, 2016
| "expected": "isosceles" | ||
| "#": "Your track may choose to skip this test and deal only with integers if appropriate", | ||
| "description": "sides may be floats", | ||
| "sides": [0.5, 0.4, 0.6], |
Contributor
There was a problem hiding this comment.
This doesn't look equilateral.
Insti
reviewed
Oct 23, 2016
| "#": "Your track may choose to skip this test and deal only with integers if appropriate", | ||
| "description": "sides may be floats", | ||
| "sides": [0.5, 0.4, 0.6], | ||
| "expected": true |
Insti
reviewed
Oct 23, 2016
| "expected": "illegal" | ||
| "description": "false if two sides are equal", | ||
| "sides": [4, 4, 3], | ||
| "expected": true |
Insti
reviewed
Oct 23, 2016
| "expected": "scalene" | ||
| "description": "true if three sides are equal", | ||
| "sides": [4, 4, 4], | ||
| "expected": true |
Contributor
There was a problem hiding this comment.
Might be good to add a comment or expansion of the description here that clarifies that this is BOTH isosceles and equilateral.
48 tasks
5 tasks
petertseng
added a commit
to petertseng/exercism-crystal
that referenced
this pull request
Nov 1, 2019
These have always been present, ever since exercism/problem-specifications#424. If the Crystal track wishes its generator to produce the test suite, without need for post-hoc modification of the generated output, then it seems the two choices are: 1. Include the cases 2. Add code that detects float inputs and does not output those cases. This commit implements the former plan.
petertseng
added a commit
to petertseng/exercism-crystal
that referenced
this pull request
Nov 1, 2019
These have always been present, ever since exercism/problem-specifications#424. If the Crystal track wishes its generator to produce the test suite, without need for post-hoc modification of the generated output, then it seems the two choices are: 1. Include the cases 2. Add code that detects float inputs and does not output those cases. This commit implements the former plan.
petertseng
added a commit
to petertseng/exercism-crystal
that referenced
this pull request
Nov 1, 2019
These have always been present, ever since exercism/problem-specifications#424. If the Crystal track wishes its generator to produce the test suite, without need for post-hoc modification of the generated output, then it seems the two choices are: 1. Include the cases 2. Add code that detects float inputs and does not output those cases. This commit implements the former plan.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed here: #379
Converts the tests so that they are checking the property of a triangle
and not its type (or type stand-in like symbol/atom/etc.).
I've removed some duplicative tests, but I believe I've still covered
all the edge cases that were part of the old test suite.