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

Unified Diff: tests/language/src/StringInterpolate2Test.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, 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/language/src/StringInterpolate2Test.dart
diff --git a/tests/language/src/StringInterpolate2Test.dart b/tests/language/src/StringInterpolate2Test.dart
deleted file mode 100644
index fe4e6a82deb926203d8c445bdaaca890a3090326..0000000000000000000000000000000000000000
--- a/tests/language/src/StringInterpolate2Test.dart
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test program testing string interpolation of expressions.
-
-
-class StringInterpolate2Test {
-
- static var F1;
-
- static void testMain() {
-
- F1 = "1 + 5 = ${1+5}";
-
- Expect.equals("1 + 5 = 6", F1);
-
- var fib = [1, 1, 2, 3, 5, 8, 13, 21];
-
- var i = 5;
- var s = "${i}";
- Expect.equals("5", s);
-
- s = "fib(${i}) = ${fib[i]}";
- Expect.equals("fib(5) = 8", s);
-
- i = 5;
- s = "$i squared is ${((x) => x*x)(i)}";
- Expect.equals("5 squared is 25", s);
-
- Expect.equals("8", "${fib.length}");
- // test single quote
- Expect.equals("8", '${fib.length}');
- // test multi-line
- Expect.equals("8", '${fib.
- length}');
-
- var map = { "red": 1, "green": 2, "blue": 3 };
- s = "green has value ${map["green"]}";
- Expect.equals("green has value 2", s);
-
- i = 0;
- b() => "${++i}";
- s = "aaa ${"bbb ${b()} bbb"} aaa ${b()}";
- Expect.equals("aaa bbb 1 bbb aaa 2", s);
-
- // test multiple levels of nesting, including changing quotes and
- // multiline string types
- s = "a ${(){ return 'b ${(){ return """
-c""";}()}'; }()} d";
- Expect.equals("a b c d", s);
- }
-}
-
-main() {
- StringInterpolate2Test.testMain();
-}
« no previous file with comments | « tests/language/src/StringInterpolate2NegativeTest.dart ('k') | tests/language/src/StringInterpolateNPETest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698