Chromium Code Reviews| Index: tests/lib/mirrors/invoke_call_through_implicit_getter_test.dart |
| diff --git a/tests/lib/mirrors/invoke_call_through_getter_test.dart b/tests/lib/mirrors/invoke_call_through_implicit_getter_test.dart |
| similarity index 74% |
| copy from tests/lib/mirrors/invoke_call_through_getter_test.dart |
| copy to tests/lib/mirrors/invoke_call_through_implicit_getter_test.dart |
| index 71dca685971d1aa2a189395bb5eb7b34ac2ebb51..3a2967a8d9ed16f1cb3d1a9c087780be9d3acc5b 100644 |
| --- a/tests/lib/mirrors/invoke_call_through_getter_test.dart |
| +++ b/tests/lib/mirrors/invoke_call_through_implicit_getter_test.dart |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| +// Copyright (c) 2014, 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. |
| @@ -16,14 +16,20 @@ class FakeFunctionNSM { |
| } |
| class C { |
| - get fakeFunctionCall => new FakeFunctionCall(); |
| - get fakeFunctionNSM => new FakeFunctionNSM(); |
| - get closure => (x, y) => '2 $this $x $y'; |
| - get closureOpt => (x, y, [z, w]) => '3 $this $x $y $z $w'; |
| - get closureNamed => (x, y, {z, w}) => '4 $this $x $y $z $w'; |
| - get notAClosure => 'Not a closure'; |
| + var fakeFunctionCall = new FakeFunctionCall(); |
| + var fakeFunctionNSM = new FakeFunctionNSM(); |
| + var closure; // = (x, y) => '2 $this $x $y'; |
| + var closureOpt; // = (x, y, [z, w]) => '3 $this $x $y $z $w'; |
| + var closureNamed; // = (x, y, {z, w}) => '4 $this $x $y $z $w'; |
| + var notAClosure = 'Not a closure'; |
| noSuchMethod(msg) => 'DNU'; |
| + C() { |
| + closure = (x, y) => '2 $this $x $y'; |
| + closureOpt = (x, y, [z, w]) => '3 $this $x $y $z $w'; |
| + closureNamed = (x, y, {z, w}) => '4 $this $x $y $z $w'; |
| + } |
| + |
| toString() => 'C'; |
| } |
| @@ -62,12 +68,12 @@ testInstanceReflective() { |
| } |
| class D { |
| - static get fakeFunctionCall => new FakeFunctionCall(); |
| - static get fakeFunctionNSM => new FakeFunctionNSM(); |
| - static get closure => (x, y) => '2 $x $y'; |
| - static get closureOpt => (x, y, [z, w]) => '3 $x $y $z $w'; |
| - static get closureNamed => (x, y, {z, w}) => '4 $x $y $z $w'; |
| - static get notAClosure => 'Not a closure'; |
| + static var fakeFunctionCall = new FakeFunctionCall(); |
| + static var fakeFunctionNSM = new FakeFunctionNSM(); |
| + static var closure = (x, y) => '2 $x $y'; |
| + static var closureOpt = (x, y, [z, w]) => '3 $x $y $z $w'; |
| + static var closureNamed = (x, y, {z, w}) => '4 $x $y $z $w'; |
| + static var notAClosure = 'Not a closure'; |
| } |
| testClassBase() { |
| @@ -96,12 +102,12 @@ testClassReflective() { |
| (e) => e is NoSuchMethodError); |
| } |
| -get fakeFunctionCall => new FakeFunctionCall(); |
| -get fakeFunctionNSM => new FakeFunctionNSM(); |
| -get closure => (x, y) => '2 $x $y'; |
| -get closureOpt => (x, y, [z, w]) => '3 $x $y $z $w'; |
| -get closureNamed => (x, y, {z, w}) => '4 $x $y $z $w'; |
| -get notAClosure => 'Not a closure'; |
| +var fakeFunctionCall = new FakeFunctionCall(); |
| +var fakeFunctionNSM = new FakeFunctionNSM(); |
| +var closure = (x, y) => '2 $x $y'; |
| +var closureOpt = (x, y, [z, w]) => '3 $x $y $z $w'; |
| +var closureNamed = (x, y, {z, w}) => '4 $x $y $z $w'; |
| +var notAClosure = 'Not a closure'; |
| testLibraryBase() { |
| Expect.equals('1 5 6', fakeFunctionCall(5, 6)); |
| @@ -130,10 +136,12 @@ testLibraryReflective() { |
| } |
| main() { |
| - testInstanceBase(); |
| + // Multitest so we exerice the paths where are and are not previously accessed |
|
floitsch
2014/03/13 12:06:43
exercise
|
| + // at the base level. |
| + testInstanceBase(); /// 01: ok |
| testInstanceReflective(); |
| - testClassBase(); |
| + testClassBase(); /// 01: ok |
| testClassReflective(); |
| - testLibraryBase(); |
| + testLibraryBase(); /// 01: ok |
| testLibraryReflective(); |
| } |