| 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | |
| 6 | gTestfile = '7.7.3-2.js'; |
| 7 | |
| 8 | /** |
| 9 | File Name: 7.7.3-2.js |
| 10 | ECMA Section: 7.7.3 Numeric Literals |
| 11 | |
| 12 | Description: |
| 13 | |
| 14 | This is a regression test for |
| 15 | http://scopus.mcom.com/bugsplat/show_bug.cgi?id=122884 |
| 16 | |
| 17 | Waldemar's comments: |
| 18 | |
| 19 | A numeric literal that starts with either '08' or '09' is interpreted as a |
| 20 | decimal literal; it should be an error instead. (Strictly speaking, according |
| 21 | to ECMA v1 such literals should be interpreted as two integers -- a zero |
| 22 | followed by a decimal number whose first digit is 8 or 9, but this is a bug in |
| 23 | ECMA that will be fixed in v2. In any case, there is no place in the grammar |
| 24 | where two consecutive numbers would be legal.) |
| 25 | |
| 26 | Author: [email protected] |
| 27 | Date: 15 june 1998 |
| 28 | |
| 29 | */ |
| 30 | var SECTION = "7.7.3-2"; |
| 31 | var VERSION = "ECMA_1"; |
| 32 | var TITLE = "Numeric Literals"; |
| 33 | var BUGNUMBER="122884"; |
| 34 | |
| 35 | startTest(); |
| 36 | |
| 37 | writeHeaderToLog( SECTION + " "+ TITLE); |
| 38 | |
| 39 | new TestCase( SECTION, |
| 40 | "9", |
| 41 | 9, |
| 42 | 9 ); |
| 43 | |
| 44 | new TestCase( SECTION, |
| 45 | "09", |
| 46 | 9, |
| 47 | 09 ); |
| 48 | |
| 49 | new TestCase( SECTION, |
| 50 | "099", |
| 51 | 99, |
| 52 | 099 ); |
| 53 | |
| 54 | |
| 55 | new TestCase( SECTION, |
| 56 | "077", |
| 57 | 63, |
| 58 | 077 ); |
| 59 | |
| 60 | test(); |