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

Side by Side Diff: tests/language/src/CompileTimeConstantOTest.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 compile-time constants with string-interpolation.
5
6 final str = "foo";
7 final m1 = const { "foo": 499 };
8 final m2 = const { "$str": 499 };
9 final m3 = const { "$str": 42, "foo": 499 };
10 final m4 = const { "foo": 42, "$str": 499 };
11 final m5 = const { "f" "o" "o": 499 };
12
13 final mm1 = const { "afoo#foo": 499 };
14 final mm2 = const { "a$str#$str": 499 };
15 final mm3 = const { "a" "$str" "#" "foo": 499 };
16 final mm4 = const { "a$str" "#$str": 499 };
17
18 main() {
19 Expect.equals(1, m1.length);
20 Expect.equals(499, m1["foo"]);
21 Expect.identical(m1, m2);
22 Expect.identical(m1, m3);
23 Expect.identical(m1, m4);
24 Expect.identical(m1, m5);
25
26 Expect.equals(1, mm1.length);
27 Expect.equals(499, mm1["afoo#foo"]);
28 Expect.identical(mm1, mm2);
29 Expect.identical(mm1, mm3);
30 Expect.identical(mm1, mm4);
31 }
OLDNEW
« no previous file with comments | « tests/language/src/CompileTimeConstantNTest.dart ('k') | tests/language/src/CompileTimeConstantPTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698