Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Side by Side Diff: tests/language/number_identifier_test.dart

Issue 23583038: Fix dart2js decimal number tokenization. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Analyzer tests passing now. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 main() { 7 main() {
8 // Integer literals. 8 // Integer literals.
9 Expect.isTrue(2is int); 9 Expect.isTrue(2is int);
10 Expect.equals(2, 2as int); 10 Expect.equals(2, 2as int);
(...skipping 13 matching lines...) Expand all
24 Expect.isTrue(.2is double); 24 Expect.isTrue(.2is double);
25 Expect.equals(0.2, .2as double); 25 Expect.equals(0.2, .2as double);
26 Expect.isTrue(1e2is double); 26 Expect.isTrue(1e2is double);
27 Expect.equals(1e2, 1e2as double); 27 Expect.equals(1e2, 1e2as double);
28 Expect.isTrue(1e-2is double); 28 Expect.isTrue(1e-2is double);
29 Expect.equals(1e-2, 1e-2as double); 29 Expect.equals(1e-2, 1e-2as double);
30 Expect.isTrue(1e+2is double); 30 Expect.isTrue(1e+2is double);
31 Expect.equals(1e+2, 1e+2as double); 31 Expect.equals(1e+2, 1e+2as double);
32 Expect.throws(() => 1.e+2, /// 05: ok 32 Expect.throws(() => 1.e+2, /// 05: ok
33 (e) => e is NoSuchMethodError); /// 05: continued 33 (e) => e is NoSuchMethodError); /// 05: continued
34 1d; /// 06: compile-time error
35 1D; /// 07: compile-time error
36 Expect.throws(() => 1.d+2, /// 08: ok
37 (e) => e is NoSuchMethodError); /// 08: continued
38 Expect.throws(() => 1.D+2, /// 09: ok
39 (e) => e is NoSuchMethodError); /// 09: continued
40 1.1d; /// 10: compile-time error
41 1.1D; /// 11: compile-time error
34 1e; /// 02: compile-time error 42 1e; /// 02: compile-time error
35 1x; /// 03: compile-time error 43 1x; /// 03: compile-time error
36 } 44 }
OLDNEW
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698