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

Unified Diff: tests/language/src/TypeChecksInFactoryMethodTest.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/TryCatchTest.dart ('k') | tests/language/src/TypeDartcTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/TypeChecksInFactoryMethodTest.dart
diff --git a/tests/language/src/TypeChecksInFactoryMethodTest.dart b/tests/language/src/TypeChecksInFactoryMethodTest.dart
deleted file mode 100644
index 9709cf18c05ba1b9f749ece144814a62566fd2e2..0000000000000000000000000000000000000000
--- a/tests/language/src/TypeChecksInFactoryMethodTest.dart
+++ /dev/null
@@ -1,39 +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.
-// VMOptions=--enable_type_checks --enable_asserts
-// Tests the type checking when passing code into closure from inside a factory method
-
-interface Foo<T> default Bar<T> {
- Foo.from();
-}
-
-class Bar<T> implements Foo<T> {
- Bar() {}
-
- factory Bar.from() {
- var func = (T arg) {
- T foo = arg;
- bool isString = foo is String;
- print(arg);
- print(" String=" + isString);
- };
-
- func("Hello World!"); // If T is not String, dynamic type checks should fail
- return new Bar<T>();
- }
-}
-
-main() {
- Foo<String> value1;
- value1 = new Foo<String>.from();
-
- bool gotError = false;
-
- try {
- Foo<int> value2 = new Foo<int>.from();
- } catch (TypeError e) {
- gotError = true;
- }
- Expect.equals(true, gotError);
-}
« no previous file with comments | « tests/language/src/TryCatchTest.dart ('k') | tests/language/src/TypeDartcTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698