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

Side by Side Diff: tests/language_strong/compile_time_constant3_test.dart

Issue 2994383002: Migrating block 50, first commit, after tool has run (Closed)
Patch Set: formatting Created 3 years, 4 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
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
5 import "package:expect/expect.dart";
6
7 const x = 19.5;
8 const y = 3.3;
9 const g1 = x + y;
10 const g2 = x * y;
11 const g3 = x / y;
12 const g4 = x ~/ y;
13 const g5 = -x;
14 const g6 = x < y;
15 const g7 = x <= y;
16 const g8 = x <= x;
17 const g9 = x > y;
18 const g10 = x >= y;
19 const g11 = x >= x;
20 const g12 = x == y;
21 const g13 = x == x;
22 const g14 = x != y;
23 const g15 = x != x;
24 const g16 = g1 + g2 + g3 + g4 + g5;
25 const g17 = x % y;
26
27 main() {
28 Expect.equals(22.8, g1);
29 Expect.equals(64.35, g2);
30 Expect.equals(5.909090909090909, g3);
31 Expect.equals(5.0, g4);
32 Expect.equals(-19.5, g5);
33 Expect.equals(false, g6);
34 Expect.equals(false, g7);
35 Expect.equals(true, g8);
36 Expect.equals(true, g9);
37 Expect.equals(true, g10);
38 Expect.equals(true, g11);
39 Expect.equals(false, g12);
40 Expect.equals(true, g13);
41 Expect.equals(true, g14);
42 Expect.equals(false, g15);
43 Expect.equals(78.5590909090909, g16);
44 Expect.equals(3.000000000000001, g17);
45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698