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.
As noted by Johan, returning different data types is a bad kata design.
I don't see how this kata is different from this.
Please spare us the input validation. It doesn't really add anything but frustration; it's not a good way to improve difficulty.
Please do NOT use
Test.expect
.Also, you're using it wrong. The message is printed when the test fails, so your messages are reversed. "The integral of .. is equal to .., but your answer was .."
There are exceedingly few occasions to use any assertions other than
Test.assertDeepEquals
orTest.assertApproxEquals
.Seems to be a duplicate of this.
No sample tests, no random tests.