| Index: tests/language/invocation_mirror_empty_arguments_test.dart
|
| diff --git a/tests/language/invocation_mirror_empty_arguments_test.dart b/tests/language/invocation_mirror_empty_arguments_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8212536404960d6b66611e76644b70e29110aad4
|
| --- /dev/null
|
| +++ b/tests/language/invocation_mirror_empty_arguments_test.dart
|
| @@ -0,0 +1,46 @@
|
| +// Copyright (c) 2015, 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";
|
| +
|
| +class Getter {
|
| + noSuchMethod(invocation) {
|
| + Expect.isTrue(invocation.isGetter);
|
| + Expect.identical(const [], invocation.positionalArguments);
|
| + Expect.identical(const {}, invocation.namedArguments);
|
| + }
|
| +}
|
| +
|
| +class Setter {
|
| + noSuchMethod(invocation) {
|
| + Expect.isTrue(invocation.isSetter);
|
| + Expect.identical(const {}, invocation.namedArguments);
|
| + }
|
| +}
|
| +
|
| +class Method {
|
| + noSuchMethod(invocation) {
|
| + Expect.isTrue(invocation.isMethod);
|
| + Expect.identical(const [], invocation.positionalArguments);
|
| + Expect.identical(const {}, invocation.namedArguments);
|
| + }
|
| +}
|
| +
|
| +class Operator {
|
| + noSuchMethod(invocation) {
|
| + Expect.isTrue(invocation.isMethod);
|
| + Expect.identical(const {}, invocation.namedArguments);
|
| + }
|
| +}
|
| +
|
| +main() {
|
| + var g = new Getter();
|
| + print(g.getterThatDoesNotExist);
|
| + var s = new Setter();
|
| + print(s.setterThatDoesNotExist = 42);
|
| + var m = new Method();
|
| + print(m.methodThatDoesNotExist());
|
| + var o = new Operator();
|
| + print(o + 42); // Operator that does not exist.
|
| +}
|
|
|