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

Side by Side Diff: tests/language/src/DoubleToString.dart

Issue 10248007: test rename overhaul: step 8 - language tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
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.
4 // Test basic integer operations.
5
6 main() {
7 Expect.equals("NaN", (double.NAN).toString());
8 Expect.equals("Infinity", (1/0).toString());
9 Expect.equals("-Infinity", (-1/0).toString());
10 Expect.equals("0.0", (0.0).toString());
11 Expect.equals("9.0", (9.0).toString());
12 Expect.equals("90.0", (90.0).toString());
13 Expect.equals("90.12", (90.12).toString());
14 Expect.equals("0.1", (0.1).toString());
15 Expect.equals("0.01", (0.01).toString());
16 Expect.equals("0.0123", (0.0123).toString());
17 Expect.equals("111111111111111110000.0",
18 (111111111111111111111.0).toString());
19 Expect.equals("1.1111111111111111e+21",
20 (1111111111111111111111.0).toString());
21 Expect.equals("1.1111111111111111e+22",
22 (11111111111111111111111.0).toString());
23 Expect.equals("0.00001", (0.00001).toString());
24 Expect.equals("0.000001", (0.000001).toString());
25 Expect.equals("1e-7", (0.0000001).toString());
26 Expect.equals("1.2e-7", (0.00000012).toString());
27 Expect.equals("1.23e-7", (0.000000123).toString());
28 Expect.equals("1e-8", (0.00000001).toString());
29 Expect.equals("1.2e-8", (0.000000012).toString());
30 Expect.equals("1.23e-8", (0.0000000123).toString());
31
32 Expect.equals("-0.0", (-0.0).toString());
33 Expect.equals("-9.0", (-9.0).toString());
34 Expect.equals("-90.0", (-90.0).toString());
35 Expect.equals("-90.12", (-90.12).toString());
36 Expect.equals("-0.1", (-0.1).toString());
37 Expect.equals("-0.01", (-0.01).toString());
38 Expect.equals("-0.0123", (-0.0123).toString());
39 Expect.equals("-111111111111111110000.0",
40 (-111111111111111111111.0).toString());
41 Expect.equals("-1.1111111111111111e+21",
42 (-1111111111111111111111.0).toString());
43 Expect.equals("-1.1111111111111111e+22",
44 (-11111111111111111111111.0).toString());
45 Expect.equals("-0.00001", (-0.00001).toString());
46 Expect.equals("-0.000001", (-0.000001).toString());
47 Expect.equals("-1e-7", (-0.0000001).toString());
48 Expect.equals("-1.2e-7", (-0.00000012).toString());
49 Expect.equals("-1.23e-7", (-0.000000123).toString());
50 Expect.equals("-1e-8", (-0.00000001).toString());
51 Expect.equals("-1.2e-8", (-0.000000012).toString());
52 Expect.equals("-1.23e-8", (-0.0000000123).toString());
53
54 Expect.equals("1000.0", (1000.0).toString());
55 Expect.equals("0.00001", (0.00001).toString());
56 Expect.equals("1000000000000000100.0", (1000000000000000128.0).toString());
57 Expect.equals("1e+21", (1000000000000000012800.0).toString());
58 Expect.equals("-1e+21", (-1000000000000000012800.0).toString());
59 Expect.equals("1e-7", (0.0000001).toString());
60 Expect.equals("-1e-7", (-0.0000001).toString());
61 Expect.equals("1.0000000000000001e+21",
62 (1000000000000000128000.0).toString());
63 Expect.equals("0.000001", (0.000001).toString());
64 Expect.equals("1e-7", (0.0000001).toString());
65 }
OLDNEW
« no previous file with comments | « tests/language/src/DoubleComparisonTest.dart ('k') | tests/language/src/DoubleToStringAsExponentialTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698