Merge pull request #3002 from dmytroyarmak/dmytroyarmak-2999

Improve test cases for Generate Random Whole Numbers within a Range
This commit is contained in:
Quincy Larson
2015-09-04 15:27:36 -07:00

View File

@ -936,6 +936,7 @@
"tests":[
"assert(myFunction() >= min, 'The random number that\\'s generated by myFunction should be greater than or equal to the minimum number');",
"assert(myFunction() <= max, 'The random number that\\'s generated by myFunction should be less than or equal to the maximum number');",
"assert(myFunction() % 1 === 0 , 'The random number that\\'s generated by myFunction should be an integer');",
"assert((function(){if(editor.getValue().match(/max/g).length >= 2 && editor.getValue().match(/min/g).length >= 2 && editor.getValue().match(/Math.floor/g) && editor.getValue().match(/Math.random/g)){return true;}else{return false;}})(), 'You should be using the function given in the description to calculate the random in number in a range');"
],
"challengeSeed":[