blob: 290b3355b54c7bd808e10347f9871b04cef13ef3 [file] [log] [blame] [edit]
description("Tests error messages to make sure that they're sane");
function parseTest(source)
{
try {
eval(source);
} catch (e) {
return e.message
}
}
shouldBe("parseTest('0x')", "\"No hexadecimal digits after '0x'\"");
shouldBe("parseTest('0xg')", "\"No hexadecimal digits after '0x'\"");
shouldBe("parseTest('0x1.2')", "\"Unexpected number '.2'\"");
shouldBe("parseTest('0x1g')", "\"No space between hexadecimal literal and identifier\"");
shouldBe("parseTest('0x1in')", "\"No space between hexadecimal literal and identifier\"");