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.
Scala translation
C#: method name should be
PascalCase
(Please refer to implementation of backward compatibility here )C#: method name should be
PascalCase
(Please refer to implementation of backward compatibility here )I've improved the java tests including the addition of random tests if anyone wants to approve it: https://www.codewars.com/kumite/638f44ccbb8c010058658dc8?sel=638f44ccbb8c010058658dc8
Brainfuck translation if anyone is interested: https://www.codewars.com/kumite/638e1fe259b85d004a0f133f?sel=638e1fe259b85d004a0f133f
Ruby 3.0 should be enabled, check details here and here.
And if possible update the github list.
No random tests in
No sample tests and random tests in
C# random tests are failing with some weird input. I got the same input twice and expected result differs somehow. An example what is passed inside a method: "3135 5400 3656889".
Though some logs in console show "[3, 1, 3, 5, 5, 4, 0, 0, 3, 6, 5, 6]"
As much as three times the same input can be passed into a method, with two times passing and failing on a third time
Missing random tests in multiple languages (python, ruby, java, js, ...)
The C# version is almost always throwing an error every time when just returning false and running all tests. It appears to be some issue with the "Random Tests".
Random Tests: System.OutOfMemoryException : Out of memory
STDERR: Stack overflow in unmanaged: IP: 0x5d208c, fault addr: 0x7ff0b2bf9ff8
Code:
public class solution
{
public bool validate(string n)
{
return false;
}
}
The C# test cases (example and hidden ones) are wrong.
E.g. for the randomized "110 021 32667" it should return valid, but the test case expects invalid (check here: https://planetcalc.com/2464/)
Same for those example test cases...
The test cases also use the wrong C# order of parameters for
AreEqual
. And there are two that are exactly the same just pasted after one another..This (or at least the C# version of it) is a very low effort kata :/ Whoever translated it: shame on you
I am a bit confused on submitting a solution using Test Driven Development.
I have used a list of credit card numbers from https://en.wikipedia.org/wiki/Luhn_algorithm, and have validated them with my code and they all pass accordingly.
Invalid: 79927398710, 79927398711, 79927398712, 79927398714, 79927398715, 79927398716, 79927398717, 79927398718, 79927398719
Valid: 79927398713
How can I go about implementing this in TDD form?
I currently have:
Test.assertEquals(validatecard("79927398713"), true);
Test.assertEquals(validatecard("79927398710"), false);