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

Unified Diff: tests/language_strong/generic_creation_test.dart

Issue 3008573002: Migrate test block 113 to Dart 2.0. (Closed)
Patch Set: Merge fixups 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language_strong/generic_closure_test.dart ('k') | tests/language_strong/generic_deep_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language_strong/generic_creation_test.dart
diff --git a/tests/language_strong/generic_creation_test.dart b/tests/language_strong/generic_creation_test.dart
deleted file mode 100644
index eb3c4ef24f934aba2cc0f6315ce12458b56eb31d..0000000000000000000000000000000000000000
--- a/tests/language_strong/generic_creation_test.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2012, 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.
-
-import "package:expect/expect.dart";
-
-class A<X, Y, Z> {
- shift() => new A<Z, X, Y>();
- swap() => new A<Z, Y, X>();
- first() => new A<X, X, X>();
- last() => new A<Z, Z, Z>();
- wrap() => new A<A<X, X, X>, A<Y, Y, Y>, A<Z, Z, Z>>();
-}
-
-class B extends A<U, V, W> {}
-
-class C<T> extends A<U, T, W> {}
-
-class D<X, Y, Z> extends A<Y, Z, X> {}
-
-class U {}
-
-class V {}
-
-class W {}
-
-sameType(a, b) => Expect.equals(a.runtimeType, b.runtimeType);
-
-main() {
- A a = new A<U, V, W>();
- sameType(new A<W, U, V>(), a.shift());
- sameType(new A<W, V, U>(), a.swap());
- sameType(new A<U, U, U>(), a.first());
- sameType(new A<W, W, W>(), a.last());
- sameType(new A<A<U, U, U>, A<V, V, V>, A<W, W, W>>(), a.wrap());
- B b = new B();
- sameType(new A<A<U, U, U>, A<V, V, V>, A<W, W, W>>(), b.wrap());
- C c = new C<V>();
- sameType(new A<A<U, U, U>, A<V, V, V>, A<W, W, W>>(), c.wrap());
- D d = new D<U, V, W>();
- sameType(new A<A<V, V, V>, A<W, W, W>, A<U, U, U>>(), d.wrap());
-}
« no previous file with comments | « tests/language_strong/generic_closure_test.dart ('k') | tests/language_strong/generic_deep_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698