diff options
author | André Bargull <andre.bargull@gmail.com> | 2015-08-13 17:56:55 +0200 |
---|---|---|
committer | André Bargull <andre.bargull@gmail.com> | 2015-08-13 17:57:23 +0200 |
commit | 4ec97779fdea46207c589dbe36f41785343a61a8 (patch) | |
tree | 031e2fc65c79fd3755cf4e61f0abee44e035ac3f /test/built-ins/JSON/parse/15.12.2-2-9.js | |
parent | 1b14708467b4cab8055effad884071123637e475 (diff) | |
download | qtdeclarative-testsuites-4ec97779fdea46207c589dbe36f41785343a61a8.tar.gz |
Replace runTestCase with assert helpers, rest [test/built-ins]
Diffstat (limited to 'test/built-ins/JSON/parse/15.12.2-2-9.js')
-rw-r--r-- | test/built-ins/JSON/parse/15.12.2-2-9.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/test/built-ins/JSON/parse/15.12.2-2-9.js b/test/built-ins/JSON/parse/15.12.2-2-9.js index cbd697bf6..ab7ca39cc 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-9.js +++ b/test/built-ins/JSON/parse/15.12.2-2-9.js @@ -6,13 +6,8 @@ es5id: 15.12.2-2-9 description: > JSON.parse - parsing an object where property value starts and ends with a null character -includes: [runTestCase.js] ---*/ -function testcase() { - - var result = true; - var nullChars = new Array(); nullChars[0] = '\"\u0000\"'; nullChars[1] = '\"\u0001\"'; @@ -48,13 +43,7 @@ function testcase() { nullChars[31] = '\"\u001F\"'; for (var index in nullChars) { - try { + assert.throws(SyntaxError, function() { var obj = JSON.parse('{ "name" : ' + nullChars[index] + "John" + nullChars[index] + ' } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } + }); } - return result; - } -runTestCase(testcase); |