1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is Mozilla Communicator client code, released
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998
21 * the Initial Developer. All Rights Reserved.
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
42 ECMA Section: 7.7.3 Numeric Literals
44 Description: A numeric literal stands for a value of the Number type
45 This value is determined in two steps: first a
46 mathematical value (MV) is derived from the literal;
47 second, this mathematical value is rounded, ideally
48 using IEEE 754 round-to-nearest mode, to a reprentable
49 value of of the number type.
51 These test cases came from Waldemar.
53 Author: christine@netscape.com
57 var SECTION = "7.7.3-1";
58 var VERSION = "ECMA_1";
59 var TITLE = "Numeric Literals";
60 var BUGNUMBER="122877";
64 writeHeaderToLog( SECTION + " "+ TITLE);
66 new TestCase( SECTION,
71 new TestCase( SECTION,
76 new TestCase( SECTION,
81 new TestCase( SECTION,
86 new TestCase( SECTION,
91 new TestCase( SECTION,
96 new TestCase( SECTION,
101 new TestCase( SECTION,
106 new TestCase( SECTION,
111 new TestCase( SECTION,
116 new TestCase( SECTION,
121 new TestCase( SECTION,
126 new TestCase( SECTION,
127 "0x1000000000000080",
129 0x1000000000000080 );
131 new TestCase( SECTION,
132 "0x1000000000000081",
134 0x1000000000000081 );
136 new TestCase( SECTION,
137 "0x1000000000000100",
139 0x1000000000000100 );
141 new TestCase( SECTION,
142 "0x100000000000017f",
144 0x100000000000017f );
146 new TestCase( SECTION,
147 "0x1000000000000180",
149 0x1000000000000180 );
151 new TestCase( SECTION,
152 "0x1000000000000181",
154 0x1000000000000181 );
156 new TestCase( SECTION,
157 "0x10000000000001f0",
159 0x10000000000001f0 );
161 new TestCase( SECTION,
162 "0x1000000000000200",
164 0x1000000000000200 );
166 new TestCase( SECTION,
167 "0x100000000000027f",
169 0x100000000000027f );
171 new TestCase( SECTION,
172 "0x1000000000000280",
174 0x1000000000000280 );
176 new TestCase( SECTION,
177 "0x1000000000000281",
179 0x1000000000000281 );
181 new TestCase( SECTION,
182 "0x10000000000002ff",
184 0x10000000000002ff );
186 new TestCase( SECTION,
187 "0x1000000000000300",
189 0x1000000000000300 );
191 new TestCase( SECTION,
192 "0x10000000000000000",
193 18446744073709552000,
194 0x10000000000000000 );