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.
Comprehension lists are the definition of elegant.
I really like this solution, is clever, short and easy to understand.
XD
XD
nice
Wait until you learn about the secret
coffee
Python module that makes coffee for you!Python has a built-in function for everything lol
The first value is a output of your program.
ok then!
I didn't ever said it won't be fixed, I said, it was fixed in C++ (by MikChan), not in C# yet.
yep, I see this. You mean that C++ tests will be fixed and OK, but C# tests will remain buggy? Why so?
The problem is the same: tests in C++ expected "" (string.Empty) and tests in C# expect "" (string.Empty). If this was fixed for C++, why cannot this be fixed for C#?
ejini战神 fixed it in C++, each language has its own tests.
But what's with C#?
It is about strings only.
Let's look into this case: Test Failed Expected is <System.String[3]>, actual is <System.String[0]> Values differ at index [0] Missing: < "0DTFT", "91XM2ANRPN6OK0PB", <string.Empty> >
So, initial string is "0DTFT 91XM2ANRPN6OK0PB". Why does <string.Empty> present in the array? <string.Empty> is just "", i.e. nothing.
So, virtually it is everywhere.
I mean:
"0DTFT 91XM2ANRPN6OK0PB"
<string.Empty> + "0DTFT 91XM2ANRPN6OK0PB"
"0DTFT 91XM2ANRPN6OK0PB" + <string.Empty>
<string.Empty> + <string.Empty> + "0DTFT 91XM2ANRPN6OK0PB"
"0DTFT 91XM2ANRPN6OK0PB" + <string.Empty> + <string.Empty>
"0DTFT" + <string.Empty> + " 91XM2ANRPN6OK0PB"
etc.
These are totally equal expressions.
They all equal to "0DTFT 91XM2ANRPN6OK0PB".
That is why the question: if I pass "0DTFT 91XM2ANRPN6OK0PB", but your test will expect "0DTFT", "91XM2ANRPN6OK0PB" and <string.Empty> at some random position - how can I submit my solution when test fails on correct solution?
Looks like it is about tests, not about C#.
UPD: This is this issue: https://www.codewars.com/kata/57e76bc428d6fbc2d500036d/discuss/csharp#6171cd2de4e130004d59122c. The tests expected "", which is the same as string.Empty. The guy ejini战神 wrote he somehow solved it.
Because I don't know much C#, I just fixed swapped actual and expected in random tests.
so, what should we do?
In case when tests expect empty string at random position we have nondeterministic (probabilistic) tests which are inapplicable for use.
Why don't you want to create tests which will expect only non-empty strings at all array indexes?
Loading more items...