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

Unified Diff: tests/language/abstract_runtime_error_test.dart

Issue 2984443003: Migrate the language tests up to arithmetic_test. (Closed)
Patch Set: generic_methods_generic_function_result_test isn't working on DDC yet. Created 3 years, 5 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/abstract_object_method_test.dart ('k') | tests/language/abstract_syntax_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/abstract_runtime_error_test.dart
diff --git a/tests/language/abstract_runtime_error_test.dart b/tests/language/abstract_runtime_error_test.dart
deleted file mode 100644
index a34791f72adda3b9be30718250dc62b1d5dac4aa..0000000000000000000000000000000000000000
--- a/tests/language/abstract_runtime_error_test.dart
+++ /dev/null
@@ -1,44 +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";
-
-// Test various conditions around instantiating an abstract class.
-
-// From The Dart Programming Language Specification, 11.11.1 "New":
-// If q is a constructor of an abstract class then an
-// AbstractClassInstantiation- Error is thrown.
-
-abstract class Interface {
- void foo(); //# 03: static type warning
-}
-
-abstract class AbstractClass {
- toString() => 'AbstractClass';
-}
-
-class ConcreteSubclass extends AbstractClass {
- toString() => 'ConcreteSubclass';
-}
-
-class NonAbstractClass implements Interface {
- toString() => 'NonAbstractClass';
-}
-
-Interface interface() => new Interface(); //# 01: static type warning
-
-AbstractClass abstractClass() => new AbstractClass(); //# 02: static type warning
-
-bool isAbstractClassInstantiationError(e) {
- return e is AbstractClassInstantiationError;
-}
-
-void main() {
- Expect.throws(interface, isAbstractClassInstantiationError, // //# 01: continued
- "expected AbstractClassInstantiationError"); // //# 01: continued
- Expect.throws(abstractClass, isAbstractClassInstantiationError, // //# 02: continued
- "expected AbstractClassInstantiationError"); // //# 02: continued
- Expect.stringEquals('ConcreteSubclass', '${new ConcreteSubclass()}');
- Expect.stringEquals('NonAbstractClass', '${new NonAbstractClass()}');
-}
« no previous file with comments | « tests/language/abstract_object_method_test.dart ('k') | tests/language/abstract_syntax_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698