| 1 |
// Copyright (C) 2016 the V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
/*--- |
| 4 |
esid: sec-additional-syntax-numeric-literals |
| 5 |
description: Mathematical value for NonOctalDecimalIntegerLiteral |
| 6 |
info: | |
| 7 |
DecimalIntegerLiteral :: |
| 8 |
0 |
| 9 |
NonZeroDigit DecimalDigits[opt] |
| 10 |
NonOctalDecimalIntegerLiteral |
| 11 |
|
| 12 |
NonOctalDecimalIntegerLiteral :: |
| 13 |
0 NonOctalDigit |
| 14 |
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit |
| 15 |
NonOctalDecimalIntegerLiteral DecimalDigit |
| 16 |
|
| 17 |
LegacyOctalLikeDecimalIntegerLiteral :: |
| 18 |
0 OctalDigit |
| 19 |
LegacyOctalLikeDecimalIntegerLiteral OctalDigit |
| 20 |
|
| 21 |
NonOctalDigit :: one of |
| 22 |
8 9 |
| 23 |
flags: [noStrict] |
| 24 |
---*/ |
| 25 |
|
| 26 |
// NonOctalDecimalIntegerLiteral :: |
| 27 |
// 0 NonOctalDigit |
| 28 |
assert.sameValue(08, 8, '08'); |
| 29 |
assert.sameValue(09, 9, '09'); |
| 30 |
|
| 31 |
// NonOctalDecimalIntegerLiteral :: |
| 32 |
// LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit |
| 33 |
assert.sameValue(008, 8, '008'); |
| 34 |
assert.sameValue(018, 18, '018'); |
| 35 |
assert.sameValue(028, 28, '028'); |
| 36 |
assert.sameValue(038, 38, '038'); |
| 37 |
assert.sameValue(048, 48, '048'); |
| 38 |
assert.sameValue(058, 58, '058'); |
| 39 |
assert.sameValue(068, 68, '068'); |
| 40 |
assert.sameValue(078, 78, '078'); |
| 41 |
assert.sameValue(088, 88, '088'); |
| 42 |
assert.sameValue(098, 98, '098'); |
| 43 |
assert.sameValue(0708, 708, '708'); |
| 44 |
assert.sameValue(0718, 718, '718'); |
| 45 |
assert.sameValue(0728, 728, '728'); |
| 46 |
assert.sameValue(0738, 738, '738'); |
| 47 |
assert.sameValue(0748, 748, '748'); |
| 48 |
assert.sameValue(0758, 758, '758'); |
| 49 |
assert.sameValue(0768, 768, '768'); |
| 50 |
assert.sameValue(0778, 778, '778'); |
| 51 |
assert.sameValue(0788, 788, '788'); |
| 52 |
assert.sameValue(0798, 798, '798'); |
| 53 |
|
| 54 |
assert.sameValue(009, 9, '009'); |
| 55 |
assert.sameValue(019, 19, '019'); |
| 56 |
assert.sameValue(029, 29, '029'); |
| 57 |
assert.sameValue(039, 39, '039'); |
| 58 |
assert.sameValue(049, 49, '049'); |
| 59 |
assert.sameValue(059, 59, '059'); |
| 60 |
assert.sameValue(069, 69, '069'); |
| 61 |
assert.sameValue(079, 79, '079'); |
| 62 |
assert.sameValue(089, 89, '089'); |
| 63 |
assert.sameValue(099, 99, '099'); |
| 64 |
assert.sameValue(0709, 709, '0709'); |
| 65 |
assert.sameValue(0719, 719, '0719'); |
| 66 |
assert.sameValue(0729, 729, '0729'); |
| 67 |
assert.sameValue(0739, 739, '0739'); |
| 68 |
assert.sameValue(0749, 749, '0749'); |
| 69 |
assert.sameValue(0759, 759, '0759'); |
| 70 |
assert.sameValue(0769, 769, '0769'); |
| 71 |
assert.sameValue(0779, 779, '0779'); |
| 72 |
assert.sameValue(0789, 789, '0789'); |
| 73 |
assert.sameValue(0799, 799, '0799'); |
| 74 |
|
| 75 |
// NonOctalDecimalIntegerLiteral :: |
| 76 |
// NonOctalDecimalIntegerLiteral DecimalDigit |
| 77 |
assert.sameValue(080, 80, '080'); |
| 78 |
assert.sameValue(081, 81, '081'); |
| 79 |
assert.sameValue(082, 82, '082'); |
| 80 |
assert.sameValue(083, 83, '083'); |
| 81 |
assert.sameValue(084, 84, '084'); |
| 82 |
assert.sameValue(085, 85, '085'); |
| 83 |
assert.sameValue(086, 86, '086'); |
| 84 |
assert.sameValue(087, 87, '087'); |
| 85 |
assert.sameValue(088, 88, '088'); |
| 86 |
assert.sameValue(089, 89, '089'); |
| 87 |
|
| 88 |
assert.sameValue(0780, 780, '0780'); |
| 89 |
assert.sameValue(0781, 781, '0781'); |
| 90 |
assert.sameValue(0782, 782, '0782'); |
| 91 |
assert.sameValue(0783, 783, '0783'); |
| 92 |
assert.sameValue(0784, 784, '0784'); |
| 93 |
assert.sameValue(0785, 785, '0785'); |
| 94 |
assert.sameValue(0786, 786, '0786'); |
| 95 |
assert.sameValue(0787, 787, '0787'); |
| 96 |
assert.sameValue(0788, 788, '0788'); |
| 97 |
assert.sameValue(0789, 789, '0789'); |
| 98 |
|
| 99 |
assert.sameValue(090, 90, '090'); |
| 100 |
assert.sameValue(091, 91, '091'); |
| 101 |
assert.sameValue(092, 92, '092'); |
| 102 |
assert.sameValue(093, 93, '093'); |
| 103 |
assert.sameValue(094, 94, '094'); |
| 104 |
assert.sameValue(095, 95, '095'); |
| 105 |
assert.sameValue(096, 96, '096'); |
| 106 |
assert.sameValue(097, 97, '097'); |
| 107 |
assert.sameValue(098, 98, '098'); |
| 108 |
assert.sameValue(099, 99, '099'); |
| 109 |
|
| 110 |
assert.sameValue(0790, 790, '0790'); |
| 111 |
assert.sameValue(0791, 791, '0791'); |
| 112 |
assert.sameValue(0792, 792, '0792'); |
| 113 |
assert.sameValue(0793, 793, '0793'); |
| 114 |
assert.sameValue(0794, 794, '0794'); |
| 115 |
assert.sameValue(0795, 795, '0795'); |
| 116 |
assert.sameValue(0796, 796, '0796'); |
| 117 |
assert.sameValue(0797, 797, '0797'); |
| 118 |
assert.sameValue(0798, 798, '0798'); |
| 119 |
assert.sameValue(0799, 799, '0799'); |