js/src/tests/ecma/LexicalConventions/7.7.3-2.js

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:34b540bf47a3
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
7 /**
8 File Name: 7.7.3-2.js
9 ECMA Section: 7.7.3 Numeric Literals
10
11 Description:
12
13 This is a regression test for
14 http://scopus.mcom.com/bugsplat/show_bug.cgi?id=122884
15
16 Waldemar's comments:
17
18 A numeric literal that starts with either '08' or '09' is interpreted as a
19 decimal literal; it should be an error instead. (Strictly speaking, according
20 to ECMA v1 such literals should be interpreted as two integers -- a zero
21 followed by a decimal number whose first digit is 8 or 9, but this is a bug in
22 ECMA that will be fixed in v2. In any case, there is no place in the grammar
23 where two consecutive numbers would be legal.)
24
25 Author: christine@netscape.com
26 Date: 15 june 1998
27
28 */
29 var SECTION = "7.7.3-2";
30 var VERSION = "ECMA_1";
31 var TITLE = "Numeric Literals";
32 var BUGNUMBER="122884";
33
34 startTest();
35
36 writeHeaderToLog( SECTION + " "+ TITLE);
37
38 new TestCase( SECTION,
39 "9",
40 9,
41 9 );
42
43 new TestCase( SECTION,
44 "09",
45 9,
46 09 );
47
48 new TestCase( SECTION,
49 "099",
50 99,
51 099 );
52
53
54 new TestCase( SECTION,
55 "077",
56 63,
57 077 );
58
59 test();

mercurial