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.
Heya, there´s a typo regarding "´" and "'". thats all...
In theory I am kind of getting the point:
while(!res.toString()[7]===5){
for(var i=0; i<100; i++){
Test.expect...;
}}
This loop would firstly check the result.toFixed(3) variable for the 3rd decimal assuming that the result integer has always 4 digits before the dot (1234.567...).
Only if the 3rd decimal is not equal to 5 the random input should count as valid and the testing starts. If the random input leads to .xx5, then random tests should re-run.
In practice: I´m new to random testing and I tried various strategies. I never got any random results that were showing .xx5 but I don´t really know how to embed the while loop without totally changing the whole setup. again: help please :)
So I increased the random testing to 400 tests and it never appeared a .xx5 result.
I couldn´t quite figure out how to set up the while loop so that it skips tests resulting in .xx5? help please :)
So I changed all of the example test cases now but I´m not sure how to properly set up random tests so that no more .xx5 values appear.
I have 5 separate random testing functions so do I need to set up another function that checks the result for .xx5 and sends it back for re-shuffling if thats the case?
try using
´
instead of'
Ok awesome!
This comment is hidden because it contains spoiler information about the solution
by changing it to 1911 I get an error...
Expected: '\'Oliver´s daily calorie requirement is 1911 kcal.\'', instead got: '\'Oliver´s daily calorie requirement is 1911.00 kcal.\''
Should I change the rounding method?
thats weird, it works fine with my solution. Any idea how to fix this?
Thanks for your feedback, I just changed it to "Johnny rides".
Hey guys, had to re-publish it. Now everything should work fine.
random tests added.
Yeah I´ll ad random testing!
nice, cheers for your feedback!
I updated the description and tried to narrow the story down. Hope it makes more sense now!