tests/auto/qml/ecmascripttests/test262/test/language/literals/numeric/7.8.3-5-s.js
raw| 1 | // Copyright (c) 2012 Ecma International. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | es5id: 7.8.3-5-s |
| 6 | description: Strict Mode - octal extension (07) is forbidden in strict mode |
| 7 | flags: [onlyStrict] |
| 8 | ---*/ |
| 9 | |
| 10 | var err = null; |
| 11 | |
| 12 | try { |
| 13 | eval("var _7_8_3_5 = 07;"); |
| 14 | } catch (e) { |
| 15 | err = e; |
| 16 | } |
| 17 | |
| 18 | assert(err instanceof SyntaxError); |
| 19 | assert.sameValue(typeof _7_8_3_5, "undefined"); |