Skip to content
Snippets Groups Projects
Commit 35b93bb5 authored by Leo Balter's avatar Leo Balter
Browse files

Merge pull request #548 from bocoup/random-fp

Avoid false positives
parents ce503e63 6e61c27a
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,12 @@ description: >
for (var i = 0; i < 100; i++)
{
var val = Math.random();
assert.sameValue(
typeof val, 'number', 'should not produce a non-numeric value: ' + val
);
assert.notSameValue(val, NaN, 'should not produce NaN');
if (val < 0 || val >= 1)
{
$ERROR("#1: Math.random() = " + val);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment