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.
this would fail this test
assertEquals(
"apples, pears# and bananas\ngrapes\nbananas",
StripComments.stripComments( "apples, pears# and bananas\ngrapes\nbananas !$apples", new String[] { "#$", "!$" } )
);
The author has provided a function, MorseCode.get(), to retrieve the codes, but if you provide a code that function doesn't know it returns null.
This comment is hidden because it contains spoiler information about the solution
Long story short, you shouldn't modify given function signatures :P If you remove
throws Exception
, then it should work.This simply means you will only receive non-negative numbers in tests, and you shouldn't have to worry about other inputs. It should also be safe to assume that numbers won't go past integer's bounds, otherwise that would be a kata issue.
This comment is hidden because it contains spoiler information about the solution
Issue with your code is not the same as KATA issue :/ Java has 8000+ completions, so I'm pretty sure the tests are fine.
I'm not really familiar with that error message, but maybe you're trying to throw an error where it's not needed? No try-catch blocks should be needed here, as all inputs should be valid.
If you can't resolve it, try posting your code here, format it properly and mark it as spoiler.
Closing.
When summit my solution I get 4 messages like:
./src/test/java/DescendingOrderTest.java:9: error: unreported exception Exception; must be caught or declared to be thrown
assertEquals(0, DescendingOrder.sortDesc(0));
But in my tests, I test for this very same case plus:
and they all pass. ????
Any tips? Please .....