Sync triangle#1008
Conversation
|
This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested. If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos. For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping |
|
Hi @mk-mxp I hope You had great with your vacation. I know this build will fail but i want to raise a PR Because I want to discuss some test cases.
|
|
Thanks for taking this. It looked much more easy than it actually is. I'm sorry if this is out of your capabilities (time, effort, difficulty). Just in case I haven't said that before: There is a common repository that is used as a data source for the test cases: canonical data for triangle. The problem you are facing is, that the current solution interface does not match the problem anymore. We should not ask for one So, first rewrite the students stub file to contain this class interface: class Triangle
{
public function __construct(int $a, int $b, int $c)
{
throw new \BadMethodCallException(sprintf('Implement the %s method', __FUNCTION__));
}
public function isEquilateral(): bool
{
throw new \BadMethodCallException(sprintf('Implement the %s method', __FUNCTION__));
}
public function isIsosceles(): bool
{
throw new \BadMethodCallException(sprintf('Implement the %s method', __FUNCTION__));
}
public function isScalene(): bool
{
throw new \BadMethodCallException(sprintf('Implement the %s method', __FUNCTION__));
}
}Then you have to rewrite all tests and the Are you willing to do so? You can ask for help at any time. But it's also OK to say "no", as this is not an easy synchronisation anymore. |
|
To keep this an easy exercise, we should not add the [3022f537-b8e5-4cc1-8f12-fd775827a00c]
description = "equilateral triangle -> sides may be floats"
include = false
comment = "comparing floats would make the exercise too difficult" |
|
@mk-mxp Thanks! I cannot fix it for another 5 days. I am little busy with my work and personal commitment. I will try to do as soon as possible |
Fix issue #984