| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 // VMOptions=--error_on_bad_type --error_on_bad_override | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
| 5 | 5 |
| 6 // Tests that expressions evaluated in a frame see the same scope as the | 6 // Tests that expressions evaluated in a frame see the same scope as the |
| 7 // frame's method. | 7 // frame's method. |
| 8 | 8 |
| 9 import 'package:observatory/service_io.dart'; | 9 import 'package:observatory/service_io.dart'; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| 11 import 'test_helper.dart'; | 11 import 'test_helper.dart'; |
| 12 import 'service_test_common.dart'; | 12 import 'service_test_common.dart'; |
| 13 | 13 |
| 14 import 'evaluate_activation_in_method_class_other.dart'; | 14 import 'evaluate_activation_in_method_class_other.dart'; |
| 15 | 15 |
| 16 var topLevel = "TestLibrary"; | 16 var topLevel = "TestLibrary"; |
| 17 | 17 |
| 18 // ignore: mixin_inherits_from_not_object |
| 18 class Subclass extends Superclass with Klass { | 19 class Subclass extends Superclass with Klass { |
| 19 var _instVar = 'Subclass'; | 20 var _instVar = 'Subclass'; |
| 20 var instVar = 'Subclass'; | 21 var instVar = 'Subclass'; |
| 21 method() => 'Subclass'; | 22 method() => 'Subclass'; |
| 22 static staticMethod() => 'Subclass'; | 23 static staticMethod() => 'Subclass'; |
| 23 suppress_warning() => _instVar; | 24 suppress_warning() => _instVar; |
| 24 } | 25 } |
| 25 | 26 |
| 26 testeeDo() { | 27 testeeDo() { |
| 27 var obj = new Subclass(); | 28 var obj = new Subclass(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 76 |
| 76 // function.Owner verus function.Origin | 77 // function.Owner verus function.Origin |
| 77 // The mixin of Superclass is in _other.dart and the mixin | 78 // The mixin of Superclass is in _other.dart and the mixin |
| 78 // application is in _test.dart. | 79 // application is in _test.dart. |
| 79 result = await isolate.evalFrame(topFrame, 'topLevel'); | 80 result = await isolate.evalFrame(topFrame, 'topLevel'); |
| 80 print(result); | 81 print(result); |
| 81 expect(result.valueAsString, equals('OtherLibrary')); | 82 expect(result.valueAsString, equals('OtherLibrary')); |
| 82 } | 83 } |
| 83 | 84 |
| 84 main(args) => runIsolateTests(args, [testerDo], testeeConcurrent: testeeDo); | 85 main(args) => runIsolateTests(args, [testerDo], testeeConcurrent: testeeDo); |
| OLD | NEW |