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

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

Issue 1127693003: Fix analyzer warnings in service tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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=--compile-all --error_on_bad_type --error_on_bad_override 4 // VMOptions=--compile-all --error_on_bad_type --error_on_bad_override
5 5
6 library get_object_rpc_test; 6 library get_object_rpc_test;
7 7
8 import 'dart:async';
9
10 import 'package:observatory/service_io.dart'; 8 import 'package:observatory/service_io.dart';
11 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
12 10
13 import 'test_helper.dart'; 11 import 'test_helper.dart';
14 12
15 class _DummyClass { 13 class _DummyClass {
16 static var dummyVar = 11; 14 static var dummyVar = 11;
17 void dummyFunction() { 15 void dummyFunction() {
18 } 16 }
19 } 17 }
20 18
21 class _DummySubClass extends _DummyClass { 19 class _DummySubClass extends _DummyClass {
22 } 20 }
23 21
24 void warmup() { 22 void warmup() {
23 // Silence analyzer.
24 new _DummySubClass();
25 new _DummyClass().dummyFunction(); 25 new _DummyClass().dummyFunction();
26 } 26 }
27 27
28 eval(Isolate isolate, String expression) async { 28 eval(Isolate isolate, String expression) async {
29 Map params = { 29 Map params = {
30 'targetId': isolate.rootLib.id, 30 'targetId': isolate.rootLib.id,
31 'expression': expression, 31 'expression': expression,
32 }; 32 };
33 return await isolate.invokeRpcNoUpgrade('eval', params); 33 return await isolate.invokeRpcNoUpgrade('eval', params);
34 } 34 }
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 var params = { 360 var params = {
361 'objectId': 'code/0', 361 'objectId': 'code/0',
362 }; 362 };
363 var result = await isolate.invokeRpcNoUpgrade('getObject', params); 363 var result = await isolate.invokeRpcNoUpgrade('getObject', params);
364 expect(result['type'], equals('Error')); 364 expect(result['type'], equals('Error'));
365 expect(result['message'], startsWith('Unrecognized object id')); 365 expect(result['message'], startsWith('Unrecognized object id'));
366 }, 366 },
367 ]; 367 ];
368 368
369 main(args) async => runIsolateTests(args, tests, testeeBefore:warmup); 369 main(args) async => runIsolateTests(args, tests, testeeBefore:warmup);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698