summaryrefslogtreecommitdiff
path: root/test/built-ins/JSON/parse/15.12.1.1-0-1.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/JSON/parse/15.12.1.1-0-1.js')
-rw-r--r--test/built-ins/JSON/parse/15.12.1.1-0-1.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/built-ins/JSON/parse/15.12.1.1-0-1.js b/test/built-ins/JSON/parse/15.12.1.1-0-1.js
index 003fcf02f..d1bb9eecd 100644
--- a/test/built-ins/JSON/parse/15.12.1.1-0-1.js
+++ b/test/built-ins/JSON/parse/15.12.1.1-0-1.js
@@ -4,16 +4,8 @@
/*---
es5id: 15.12.1.1-0-1
description: The JSON lexical grammar treats whitespace as a token seperator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
- try {
+assert.throws(SyntaxError, function() {
JSON.parse('12\t\r\n 34'); // should produce a syntax error as whitespace results in two tokens
- }
- catch (e) {
- if (e.name === 'SyntaxError') return true;
- }
- }
-runTestCase(testcase);
+});