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

Side by Side Diff: tests/language/src/BadNamedParameters2Test.dart

Issue 9582027: Some use of the new @static-clean and /// annotations in shared tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « tests/language/language.status ('k') | tests/language/src/BadNamedParametersTest.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, 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 // Dart test program for testing bad named parameters. 4 // Dart test program for testing bad named parameters.
5 5
6 6
7 class BadNamedParameters2Test { 7 class BadNamedParameters2Test {
8 8
9 int foo(int a) { 9 int foo(int a) {
10 // Although no optional named parameters are declared, we must check that 10 // Although no optional named parameters are declared, we must check that
11 // no named arguments are passed in, either here or in the resolving stub. 11 // no named arguments are passed in, either here or in the resolving stub.
12 return a; 12 return a;
13 } 13 }
14 14
15 static testMain() { 15 static testMain() {
16 BadNamedParameters2Test np = new BadNamedParameters2Test(); 16 BadNamedParameters2Test np = new BadNamedParameters2Test();
17 17
18 // Verify that NoSuchMethod is called after an error is detected. 18 // Verify that NoSuchMethod is called after an error is detected.
19 bool caught; 19 bool caught;
20 try { 20 try {
21 caught = false; 21 caught = false;
22 np.foo(b:25); // No formal parameter named b. 22 // No formal parameter named b.
23 np.foo(b:25); /// static type error
23 } catch (NoSuchMethodException e) { 24 } catch (NoSuchMethodException e) {
24 caught = true; 25 caught = true;
25 } 26 }
26 Expect.equals(true, caught); 27 Expect.equals(true, caught);
27 } 28 }
28 } 29 }
29 30
30 main() { 31 main() {
31 BadNamedParameters2Test.testMain(); 32 BadNamedParameters2Test.testMain();
32 } 33 }
OLDNEW
« no previous file with comments | « tests/language/language.status ('k') | tests/language/src/BadNamedParametersTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698