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.
And I think your random tests are so much wrong. I cannot put screenshots here, so I'll push the text with Console.logs(). My previous code version did the calculations correctly, but your tests showed issue when:
frac1 = -32783 / -87302
frac2 = -70901 / 96443
They expect "377758809/631610602" (positive).
My correct output is "-377758809/631610602" (negative).
Similarly another example:
-53524/-96771
-76017/4842
Test Failed
Assert.That(Kata.divideFractions(randomFrac1, randomFrac2), Is.EqualTo(expected))
Expected string length 20 but was 21. Strings differ at index 0.
Expected: "259163208/1233693485"
But was: "-259163208/1233693485"
Wtf are these tests?
"The fractions will never be improper."
Meanwhile your tests:
55013/-84661
13455/71078 :)
or
-91877/-61523
82703/79988
Since when deonomiator having "-" sign is a valid fraction? XD
Method names should start from a capital letter in C#.
but
So this case is invalid.
.
This comment is hidden because it contains spoiler information about the solution
I changed my solution to use and overflow ints and it passed the random tests.
Changing all occurances of int with long in the random tests code solves this issue.
Random tests appear to be broken.
inputs: "62694/-18591" "1089/52122"
expected: "1027230628/20245599"
The expected is not even the correct sign. Are the random tests doing something like overflowing the int datatype?
Hi.Could you please recheck unit tests for expected negative/positive numbers? (.NET/C#)
Nice!
As noted by others, there is plenty of simple katas like this, I would suggest deleting this one.
Approved.
C# Translation translation added! :)
Have never seen such a name for a string. But it gave me a good laugh so I thank you for that.
Had to be one of the most difficult 8kyu Kata I have ever done, this should be at the least a 4kyu.
Loading more items...