1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/ecma/LexicalConventions/7.7.3-2.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,59 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 + 1.10 +/** 1.11 + File Name: 7.7.3-2.js 1.12 + ECMA Section: 7.7.3 Numeric Literals 1.13 + 1.14 + Description: 1.15 + 1.16 + This is a regression test for 1.17 + http://scopus.mcom.com/bugsplat/show_bug.cgi?id=122884 1.18 + 1.19 + Waldemar's comments: 1.20 + 1.21 + A numeric literal that starts with either '08' or '09' is interpreted as a 1.22 + decimal literal; it should be an error instead. (Strictly speaking, according 1.23 + to ECMA v1 such literals should be interpreted as two integers -- a zero 1.24 + followed by a decimal number whose first digit is 8 or 9, but this is a bug in 1.25 + ECMA that will be fixed in v2. In any case, there is no place in the grammar 1.26 + where two consecutive numbers would be legal.) 1.27 + 1.28 + Author: christine@netscape.com 1.29 + Date: 15 june 1998 1.30 + 1.31 +*/ 1.32 +var SECTION = "7.7.3-2"; 1.33 +var VERSION = "ECMA_1"; 1.34 +var TITLE = "Numeric Literals"; 1.35 +var BUGNUMBER="122884"; 1.36 + 1.37 +startTest(); 1.38 + 1.39 +writeHeaderToLog( SECTION + " "+ TITLE); 1.40 + 1.41 +new TestCase( SECTION, 1.42 + "9", 1.43 + 9, 1.44 + 9 ); 1.45 + 1.46 +new TestCase( SECTION, 1.47 + "09", 1.48 + 9, 1.49 + 09 ); 1.50 + 1.51 +new TestCase( SECTION, 1.52 + "099", 1.53 + 99, 1.54 + 099 ); 1.55 + 1.56 + 1.57 +new TestCase( SECTION, 1.58 + "077", 1.59 + 63, 1.60 + 077 ); 1.61 + 1.62 +test();