Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Please add fixed tests to the full test suite.
Furthermore please add meaningful assertion messages. You can check out the Rust translations of the Authoring Examples how this can be done.
Yeah, sorry, I've decided to take a break from Codewars for a while, but now I'm mostly back!
So, apologies for deserting this for a while..)
.
Applied my own fixes because original translator appears AWOL.
At least include the sample tests, and maybe a few more with larger numbers.
The assertion messages in Rust only display "left == right", but they don't tell you what left or right is (because usually you're the author of the tests, so you already know). The assertion messages should clarify to the user which one is their result and which one is the expected output.
Notes:
Rust translation
Rust translation
Rust (attempt tests only):
That's only the case with test suites like Python, as in those languages the function might be accessible from the solution. (https://docs.codewars.com/languages/python/authoring/#reference-solution)
In Rust you need to declare a function with
pub
to make it accessible from outside, which isn't the case.However, for the sake of encapsulation, I will agree that it would make more sense to have the function as part of the
tests
module.Reference solution should be inside test function.
Why do we have to write a custom class overriding
+
method (and only used withMList + list
) when a function with arbitrary arguments can be used instead? This adds nothing to the task (and in fact introduces addition irrelevant tasks to the actual task at hand).[list] + [list]
is not tested.Is this actually required? And why isn't it mentioned in the description?
Loading more items...