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.
Managed to do it thanks for your help!
Ok thank you :)
I have now used a try catch to find the input string and I have my solution working in VS.
Would it help if I messgae you my code?
Thanks for your help.
I am pretty sure the test inputs a zero length string, i tested it like this.
if (strng == "")
return "5";
Test1
Expected string length 0 but was 1. Strings differ at index 0.
Expected:
But was: "5"
-----------^
But when i return what i expect it is expecting, this happens.
if (strng == "")
return "";
Test1
System.OverflowException : Value was either too large or too small for an Int32.
at System.Number.ParseInt32 (System.String s, NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00000] in :0
at System.Int32.Parse (System.String s, IFormatProvider provider) [0x00000] in :0
at System.Convert.ToInt32 (System.String value) [0x00000] in :0
at WeightSort.orderWeight (System.String strng) [0x00000] in :0
at WeightSortTests.Test1 () [0x00000] in :0
The 50 random tests all pass fine.
Please can you give what the test returns?
C#
I get an error if i:
return "";
the test say the expected result is
expected:
so I am a bit confussed as to what it wants...