If a method changes the internal object state, if you call this method both on the substitute and the original object, the resulting objects should continue to be "interchangeable" in the sense defined above. (See the String example below if you are not sure what I mean.)
This is an absurd notion: if the original and the substitute object are supposed to be the same, then calling mutating methods on both objects should result in this being applied twice (and calling on either side should cause both to be mutated and remain the same). Otherwise they're different, and they cannot be considered the same object (as not every object supports .clone).
Athough I am correctly raising the exception in the event of a deadlock, it seems the threads are never terminated in the tests (both example and full suite) so every test run ends with a timeout.
wrong a/wrong b is terrible (and unacceptable) test feedback, so they should be changed. At least the expected and actual value should be shown, like in assert_equals.
Tests are severely lacking: only 2 threads are tested, so it is very easy for a basic deadlock checking to pass.
What is the expected handling if a thread tries to acquires a mutex it has already acquired?
Solutions like this should be patched.
This is an absurd notion: if the original and the substitute object are supposed to be the same, then calling mutating methods on both objects should result in this being applied twice (and calling on either side should cause both to be mutated and remain the same). Otherwise they're different, and they cannot be considered the same object (as not every object supports
.clone
).Needs definition/description of "thread".
Needs examples.
Hi,
There's an issue with the Python (3) translation.
Athough I am correctly raising the exception in the event of a deadlock, it seems the threads are never terminated in the tests (both example and full suite) so every test run ends with a timeout.
Java translation kumited! please accept
Linear regression has been done (e.g https://www.codewars.com/kata/5515395b9cd40b2c3e00116c), so this kata is a duplicate.
wrong a
/wrong b
is terrible (and unacceptable) test feedback, so they should be changed. At least the expected and actual value should be shown, like inassert_equals
.I'd suggest requiring the solution to deal with a set of points such as this:
…and to add correspondint tests.
Also, needs more tests.
Sample tests uses
Object
butBasicObject
is used in the actual tests.They're completely different.
Test messages are very unhelpful.
Need random tests.
This comment is hidden because it contains spoiler information about the solution
Loading more items...