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

Unified Diff: tests/lib/mirrors/redirection_type_shuffling_test.dart

Issue 28053005: Hide MirroredCompilationErrror behind a flag until post-1.0. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/lib/lib.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/redirection_type_shuffling_test.dart
diff --git a/tests/lib/mirrors/redirection_type_shuffling_test.dart b/tests/lib/mirrors/redirection_type_shuffling_test.dart
deleted file mode 100644
index 582b4148202554c6b6c4a6917ac87fd56ad9b867..0000000000000000000000000000000000000000
--- a/tests/lib/mirrors/redirection_type_shuffling_test.dart
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2013, 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 "dart:mirrors";
-import "package:expect/expect.dart";
-
-class G<A extends int, B extends String> {
- G();
- factory G.swap() = G<B,A>; /// static type warning
- factory G.retain() = G<A,B>;
-}
-
-bool get inCheckedMode {
- try {
- var i = 1;
- String s = i;
- return false;
- } catch(e) {
- return true;
- }
-}
-
-main() {
- ClassMirror cm = reflect(new G<int, String>()).type;
-
- if (inCheckedMode) {
- Expect.throws(() => cm.newInstance(#swap, []),
- (e) => e is MirroredCompilationError,
- 'Checked mode should not allow violation of type bounds');
- } else {
- Expect.isTrue(cm.newInstance(#swap, []).reflectee is G<String,int>);
- }
-
- Expect.isTrue(cm.newInstance(#retain, []).reflectee is G<int,String>);
-}
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698