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

Side by Side Diff: tests/language_strong/abstract_runtime_error_test.dart

Issue 2774783002: Re-land "Format all multitests" (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 // Test various conditions around instantiating an abstract class. 7 // Test various conditions around instantiating an abstract class.
8 8
9 // From The Dart Programming Langauge Specification, 11.11.1 "New": 9 // From The Dart Programming Langauge Specification, 11.11.1 "New":
10 // If q is a constructor of an abstract class then an 10 // If q is a constructor of an abstract class then an
11 // AbstractClassInstantiation- Error is thrown. 11 // AbstractClassInstantiation- Error is thrown.
12 12
13
14 abstract class Interface { 13 abstract class Interface {
15 void foo(); //# 03: static type warning 14 void foo(); //# 03: static type warning
16 } 15 }
17 16
18 abstract class AbstractClass { 17 abstract class AbstractClass {
19 toString() => 'AbstractClass'; 18 toString() => 'AbstractClass';
20 } 19 }
21 20
22 class ConcreteSubclass extends AbstractClass { 21 class ConcreteSubclass extends AbstractClass {
23 toString() => 'ConcreteSubclass'; 22 toString() => 'ConcreteSubclass';
(...skipping 12 matching lines...) Expand all
36 } 35 }
37 36
38 void main() { 37 void main() {
39 Expect.throws(interface, isAbstractClassInstantiationError, //# 01: continued 38 Expect.throws(interface, isAbstractClassInstantiationError, //# 01: continued
40 "expected AbstractClassInstantiationError"); // //# 01: continue d 39 "expected AbstractClassInstantiationError"); // //# 01: continue d
41 Expect.throws(abstractClass, isAbstractClassInstantiationError, //# 02: contin ued 40 Expect.throws(abstractClass, isAbstractClassInstantiationError, //# 02: contin ued
42 "expected AbstractClassInstantiationError"); // //# 02: cont inued 41 "expected AbstractClassInstantiationError"); // //# 02: cont inued
43 Expect.stringEquals('ConcreteSubclass', '${new ConcreteSubclass()}'); 42 Expect.stringEquals('ConcreteSubclass', '${new ConcreteSubclass()}');
44 Expect.stringEquals('NonAbstractClass', '${new NonAbstractClass()}'); 43 Expect.stringEquals('NonAbstractClass', '${new NonAbstractClass()}');
45 } 44 }
OLDNEW
« no previous file with comments | « tests/language_strong/abstract_getter_test.dart ('k') | tests/language_strong/argument_definition_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698