| Index: tests/language/named_parameters_test.dart
|
| ===================================================================
|
| --- tests/language/named_parameters_test.dart (revision 12414)
|
| +++ tests/language/named_parameters_test.dart (working copy)
|
| @@ -2,6 +2,7 @@
|
| // 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.
|
| // Dart test program for testing named parameters.
|
| +// VMOptions=--reject_named_argument_as_positional
|
|
|
|
|
| class NamedParametersTest {
|
| @@ -64,37 +65,28 @@
|
| Expect.equals(20, np.f21());
|
| Expect.equals(20, F10(20));
|
| Expect.equals(20, np.f21(20));
|
| - Expect.equals(20, F10(b:20));
|
| - Expect.equals(20, np.f21(b:20));
|
| + Expect.equals(20, F10(b:20)); /// 01: runtime error
|
| + Expect.equals(20, np.f21(b:20)); /// 02: runtime error
|
| Expect.equals(1020, F21(10));
|
| Expect.equals(1020, np.f32(10));
|
| Expect.equals(1025, F21(10, 25));
|
| Expect.equals(1025, np.f32(10, 25));
|
| - Expect.equals(1025, F21(10, b:25));
|
| - Expect.equals(1025, np.f32(10, b:25));
|
| + Expect.equals(1025, F21(10, b:25)); /// 03: runtime error
|
| + Expect.equals(1025, np.f32(10, b:25)); /// 04: runtime error
|
| Expect.equals(102030, F31(10));
|
| Expect.equals(102030, np.f42(10));
|
| Expect.equals(102530, F31(10, 25));
|
| Expect.equals(102530, np.f42(10, 25));
|
| - Expect.equals(102530, F31(10, b:25));
|
| - Expect.equals(102530, np.f42(10, b:25));
|
| - Expect.equals(102035, F31(10, c:35));
|
| - Expect.equals(102035, np.f42(10, c:35));
|
| - Expect.equals(102535, F31(10, b:25, c:35));
|
| - Expect.equals(102535, np.f42(10, b:25, c:35));
|
| - Expect.equals(102535, F31(10, 25, c:35));
|
| - Expect.equals(102535, np.f42(10, 25, c:35));
|
| - Expect.equals(102535, F31(10, c:35, b:25));
|
| - Expect.equals(102535, np.f42(10, c:35, b:25));
|
| + Expect.equals(102035, F31(10, c:35)); /// 05: runtime error
|
| + Expect.equals(102035, np.f42(10, c:35)); /// 06: runtime error
|
| + Expect.equals(102535, F31(10, 25, 35));
|
| + Expect.equals(102535, np.f42(10, 25, 35));
|
| + Expect.equals(102535, F31(10, 25, c:35)); /// 07: runtime error
|
| + Expect.equals(102535, np.f42(10, 25, c:35)); /// 08: runtime error
|
| Expect.equals(10200040, F41(10));
|
| Expect.equals(10200040, np.f52(10));
|
| - Expect.equals(10203540, F41(10, c:35));
|
| - Expect.equals(10203540, np.f52(10, c:35));
|
| - Expect.equals(10250045, F41(10, d:45, b:25));
|
| - Expect.equals(10250045, F41(10, 25, d:45));
|
| - Expect.equals(10250045, np.f52(10, d:45, b:25));
|
| - Expect.equals(10253545, F41(10, d:45, c:35, b:25));
|
| - Expect.equals(10253545, np.f52(10, d:45, c:35, b:25));
|
| + Expect.equals(10203540, F41(10, c:35)); /// 09: runtime error
|
| + Expect.equals(10203540, np.f52(10, c:35)); /// 10: runtime error
|
| }
|
| }
|
|
|
| @@ -109,7 +101,7 @@
|
| }
|
| }
|
|
|
| -hello(msg, to, [from]) => '${from} sent ${msg} to ${to}';
|
| +hello(msg, to, {from}) => '${from} sent ${msg} to ${to}';
|
| message() => hello("gladiolas", "possums", from: "Edna");
|
|
|
| main() {
|
|
|