| Index: tests/language/call_operator_test.dart
|
| diff --git a/tests/language/call_operator_test.dart b/tests/language/call_operator_test.dart
|
| index 56ef41ec1398ff712b25b317c9d17913e5883fc9..b89c8bcf8a234c4485d9c32a78b67b29704a885c 100644
|
| --- a/tests/language/call_operator_test.dart
|
| +++ b/tests/language/call_operator_test.dart
|
| @@ -5,39 +5,39 @@
|
|
|
| // simple test with no types in signature
|
| class A1 {
|
| - call() => 42;
|
| + operator call() => 42;
|
| }
|
|
|
| // same test, include return type
|
| class A2 {
|
| - int call() => 35;
|
| + int operator call() => 35;
|
| }
|
|
|
| class B {
|
| - call() => 28;
|
| + call() => 28; // expect warning, should use 'operator call'
|
| }
|
|
|
| // A call() operator can have any arity
|
| class C {
|
| - call(arg) => 7 * arg;
|
| + operator call(arg) => 7 * arg;
|
| }
|
|
|
| // Test named arguments
|
| class D {
|
| - call([arg=6]) => 7 * arg;
|
| + operator call([arg=6]) => 7 * arg;
|
| }
|
|
|
| -// Non-trivial method body combination of positional and named.
|
| +// non-trvial method body combination of positional and named
|
| class E {
|
| - String call(String str, [int count=1]) {
|
| - StringBuffer buffer = new StringBuffer();
|
| + String operator call(String str, [int count=1]) {
|
| + String result = "";
|
| for (var i = 0; i < count; i++) {
|
| - buffer.add(str);
|
| - if (i < count - 1) {
|
| - buffer.add(":");
|
| + result += str;
|
| + if (i < count -1) {
|
| + result += ':';
|
| }
|
| }
|
| - return buffer.toString();
|
| + return result;
|
| }
|
| }
|
|
|
|
|