Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: runtime/observatory/tests/service/evaluate_activation_in_method_class_test.dart

Issue 2073893002: Removed all analyzer issues from tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Merge branch 'master' of https://github.com/dart-lang/sdk into tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 class Subclass extends Superclass with Klass { 18 class Subclass extends Superclass with Klass {
19 var _instVar = 'Subclass'; 19 var _instVar = 'Subclass';
20 var instVar = 'Subclass'; 20 var instVar = 'Subclass';
21 method() => 'Subclass'; 21 method() => 'Subclass';
22 static staticMethod() => 'Subclass'; 22 static staticMethod() => 'Subclass';
23 suppress_warning() => _instVar;
23 } 24 }
24 25
25 testeeDo() { 26 testeeDo() {
26 var obj = new Subclass(); 27 var obj = new Subclass();
27 obj.test(); 28 obj.test();
28 } 29 }
29 30
30 testerDo(Isolate isolate) async { 31 testerDo(Isolate isolate) async {
31 await hasStoppedAtBreakpoint(isolate); 32 await hasStoppedAtBreakpoint(isolate);
32 33
(...skipping 30 matching lines...) Expand all
63 print(result); 64 print(result);
64 expect(result.valueAsString, equals('Superclass')); 65 expect(result.valueAsString, equals('Superclass'));
65 66
66 result = await isolate.evalFrame(topFrame, 'super.method()'); 67 result = await isolate.evalFrame(topFrame, 'super.method()');
67 print(result); 68 print(result);
68 expect(result.valueAsString, equals('Superclass')); 69 expect(result.valueAsString, equals('Superclass'));
69 70
70 result = await isolate.evalFrame(topFrame, 'staticMethod()'); 71 result = await isolate.evalFrame(topFrame, 'staticMethod()');
71 print(result); 72 print(result);
72 expect(result.valueAsString, equals('Klass')); 73 expect(result.valueAsString, equals('Klass'));
73 74
74 // function.Owner verus function.Origin 75 // function.Owner verus function.Origin
75 // The mixin of Superclass is in _other.dart and the mixin 76 // The mixin of Superclass is in _other.dart and the mixin
76 // application is in _test.dart. 77 // application is in _test.dart.
77 result = await isolate.evalFrame(topFrame, 'topLevel'); 78 result = await isolate.evalFrame(topFrame, 'topLevel');
78 print(result); 79 print(result);
79 expect(result.valueAsString, equals('OtherLibrary')); 80 expect(result.valueAsString, equals('OtherLibrary'));
80 } 81 }
81 82
82 main(args) => runIsolateTests(args, [testerDo], testeeConcurrent:testeeDo); 83 main(args) => runIsolateTests(args, [testerDo], testeeConcurrent:testeeDo);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698