michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: /** michael@0: File Name: 7.7.3-2.js michael@0: ECMA Section: 7.7.3 Numeric Literals michael@0: michael@0: Description: michael@0: michael@0: This is a regression test for michael@0: http://scopus.mcom.com/bugsplat/show_bug.cgi?id=122884 michael@0: michael@0: Waldemar's comments: michael@0: michael@0: A numeric literal that starts with either '08' or '09' is interpreted as a michael@0: decimal literal; it should be an error instead. (Strictly speaking, according michael@0: to ECMA v1 such literals should be interpreted as two integers -- a zero michael@0: followed by a decimal number whose first digit is 8 or 9, but this is a bug in michael@0: ECMA that will be fixed in v2. In any case, there is no place in the grammar michael@0: where two consecutive numbers would be legal.) michael@0: michael@0: Author: christine@netscape.com michael@0: Date: 15 june 1998 michael@0: michael@0: */ michael@0: var SECTION = "7.7.3-2"; michael@0: var VERSION = "ECMA_1"; michael@0: var TITLE = "Numeric Literals"; michael@0: var BUGNUMBER="122884"; michael@0: michael@0: startTest(); michael@0: michael@0: writeHeaderToLog( SECTION + " "+ TITLE); michael@0: michael@0: new TestCase( SECTION, michael@0: "9", michael@0: 9, michael@0: 9 ); michael@0: michael@0: new TestCase( SECTION, michael@0: "09", michael@0: 9, michael@0: 09 ); michael@0: michael@0: new TestCase( SECTION, michael@0: "099", michael@0: 99, michael@0: 099 ); michael@0: michael@0: michael@0: new TestCase( SECTION, michael@0: "077", michael@0: 63, michael@0: 077 ); michael@0: michael@0: test();