Broken error message in test (#1358)

Fixes #1355
This commit is contained in:
Isiah Meadows 2017-11-28 10:34:04 -05:00 committed by Leo Balter
parent da61938f8f
commit 6ca3634d1b
1 changed files with 5 additions and 3 deletions

View File

@ -41,9 +41,11 @@ function SwitchTest(value){
return result;
}
if(!(SwitchTest(eval('Number(false)')) === 6)){
$ERROR("#1: SwitchTest(0) === 6. Actual: SwitchTest(0) ==="+ SwitchTest(0) );
var n = Number(false);
if(!(SwitchTest(n) === 6)){
$ERROR("#1: SwitchTest(Number(false)) === 6. Actual: SwitchTest(Number(false)) ==="+ SwitchTest(n) );
}
if(!(SwitchTest(parseInt) === 32)){