| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 named parameters. | 4 // Dart test program for testing named parameters. |
| 5 | 5 |
| 6 import "package:expect/expect.dart"; |
| 7 |
| 6 | 8 |
| 7 class TypeTester<T> {} | 9 class TypeTester<T> {} |
| 8 | 10 |
| 9 // Expect compile-time error as no default values are allowed | 11 // Expect compile-time error as no default values are allowed |
| 10 // in closure type definitions. | 12 // in closure type definitions. |
| 11 typedef void Callback([String msg | 13 typedef void Callback([String msg |
| 12 = "" /// 01: compile-time error | 14 = "" /// 01: compile-time error |
| 13 ]); | 15 ]); |
| 14 | 16 |
| 15 class NamedParametersAggregatedTests { | 17 class NamedParametersAggregatedTests { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 ); | 49 ); |
| 48 | 50 |
| 49 // Expect compile-time error due to missing positional argument. | 51 // Expect compile-time error due to missing positional argument. |
| 50 NamedParametersAggregatedTests.F31(b:25, c:35); /// 05: static type warning | 52 NamedParametersAggregatedTests.F31(b:25, c:35); /// 05: static type warning |
| 51 | 53 |
| 52 new TypeTester<Callback>(); | 54 new TypeTester<Callback>(); |
| 53 | 55 |
| 54 (new NamedParametersAggregatedTests()).InstallCallback(null); | 56 (new NamedParametersAggregatedTests()).InstallCallback(null); |
| 55 | 57 |
| 56 } | 58 } |
| OLD | NEW |