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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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 // Test compile-time constants with string-interpolation. 4 // Test compile-time constants with string-interpolation.
5 5
6 import "package:expect/expect.dart";
7
8 const str = "foo"; 6 const str = "foo";
9 const m1 = const { "foo": 499 }; 7 const m1 = const { "foo": 499 };
10 const m2 = const { "$str": 499 }; 8 const m2 = const { "$str": 499 };
11 const m3 = const { "$str": 42, "foo": 499 }; 9 const m3 = const { "$str": 42, "foo": 499 };
12 const m4 = const { "foo": 42, "$str": 499 }; 10 const m4 = const { "foo": 42, "$str": 499 };
13 const m5 = const { "f" "o" "o": 499 }; 11 const m5 = const { "f" "o" "o": 499 };
14 12
15 const mm1 = const { "afoo#foo": 499 }; 13 const mm1 = const { "afoo#foo": 499 };
16 const mm2 = const { "a$str#$str": 499 }; 14 const mm2 = const { "a$str#$str": 499 };
17 const mm3 = const { "a" "$str" "#" "foo": 499 }; 15 const mm3 = const { "a" "$str" "#" "foo": 499 };
18 const mm4 = const { "a$str" "#$str": 499 }; 16 const mm4 = const { "a$str" "#$str": 499 };
19 17
20 main() { 18 main() {
21 Expect.equals(1, m1.length); 19 Expect.equals(1, m1.length);
22 Expect.equals(499, m1["foo"]); 20 Expect.equals(499, m1["foo"]);
23 Expect.identical(m1, m2); 21 Expect.identical(m1, m2);
24 Expect.identical(m1, m3); 22 Expect.identical(m1, m3);
25 Expect.identical(m1, m4); 23 Expect.identical(m1, m4);
26 Expect.identical(m1, m5); 24 Expect.identical(m1, m5);
27 25
28 Expect.equals(1, mm1.length); 26 Expect.equals(1, mm1.length);
29 Expect.equals(499, mm1["afoo#foo"]); 27 Expect.equals(499, mm1["afoo#foo"]);
30 Expect.identical(mm1, mm2); 28 Expect.identical(mm1, mm2);
31 Expect.identical(mm1, mm3); 29 Expect.identical(mm1, mm3);
32 Expect.identical(mm1, mm4); 30 Expect.identical(mm1, mm4);
33 } 31 }
OLDNEW
« no previous file with comments | « tests/language/compile_time_constant_n_test.dart ('k') | tests/language/compile_time_constant_p_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698