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

Unified Diff: tests/language/src/DynamicTest.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
« no previous file with comments | « tests/language/src/DynamicFieldTest.dart ('k') | tests/language/src/EmptyBlockCaseTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/DynamicTest.dart
diff --git a/tests/language/src/DynamicTest.dart b/tests/language/src/DynamicTest.dart
deleted file mode 100644
index 924ccbd7a757a64243a0049076e11b00bfe8280b..0000000000000000000000000000000000000000
--- a/tests/language/src/DynamicTest.dart
+++ /dev/null
@@ -1,63 +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 the use of 'Dynamic' in generic types.
-// @static-clean
-
-interface Iface<K,V> {
-}
-
-class M1<K, V> implements Iface<K, V> {
-}
-
-class M2<K> implements Iface<K, Dynamic> {
-}
-
-class M3 implements Iface<String, Dynamic> {
-}
-
-typedef Dynamic F1<T>(Dynamic x, T y);
-
-class HasFieldDynamic {
- HasFieldDynamic() : Dynamic = "Dynamic" { }
- var Dynamic; // Field named Dynamic is allowed.
-}
-
-class HasMethodDynamic {
- Dynamic() => "Dynamic"; // Method named Dynamic is allowed.
-}
-
-main() {
- M1<Dynamic, Dynamic> m1 = new M1<Dynamic, Dynamic>();
- Expect.isTrue(m1 is Iface<Dynamic, num>);
- Expect.isTrue(m1 is Iface<String, Dynamic>);
- Expect.isTrue(m1 is Iface<String, num>);
- Expect.isTrue(m1 is Iface<num, String>);
-
- M2<Dynamic> m2 = new M2<Dynamic>();
- Expect.isTrue(m2 is Iface<Dynamic, num>);
- Expect.isTrue(m2 is Iface<String, Dynamic>);
- Expect.isTrue(m2 is Iface<String, num>);
- Expect.isTrue(m2 is Iface<num, String>);
-
- M3 m3 = new M3();
- Expect.isTrue(m3 is Iface<Dynamic, num>);
- Expect.isTrue(m3 is Iface<String, Dynamic>);
- Expect.isTrue(m3 is Iface<String, num>);
- Expect.isTrue(m3 is !Iface<num, String>);
-
- F1<int> f1 = (String s, int i) => s[i];
- Expect.isTrue(f1 is F1<int>);
-
- HasFieldDynamic has_field = new HasFieldDynamic();
- Expect.equals("Dynamic", has_field.Dynamic);
-
- HasMethodDynamic has_method = new HasMethodDynamic();
- Expect.equals("Dynamic", has_method.Dynamic());
-
- {
- int Dynamic = 0; // Local variable named Dynamic is allowed.
- Expect.equals(0, Dynamic);
- }
-}
« no previous file with comments | « tests/language/src/DynamicFieldTest.dart ('k') | tests/language/src/EmptyBlockCaseTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698