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

Side by Side Diff: test/instance_test.dart

Issue 1863233002: Fix some broken tests. (Closed) Base URL: git@github.com:dart-lang/vm_service_client.git@master
Patch Set: Code review changes Created 4 years, 8 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
« no previous file with comments | « pubspec.yaml ('k') | test/isolate_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:typed_data'; 6 import 'dart:typed_data';
7 7
8 import 'package:vm_service_client/vm_service_client.dart'; 8 import 'package:vm_service_client/vm_service_client.dart';
9 import 'package:test/test.dart'; 9 import 'package:test/test.dart';
10 10
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 var context = await value.context.load(); 323 var context = await value.context.load();
324 expect(context.variables, hasLength(1)); 324 expect(context.variables, hasLength(1));
325 expect(context.variables.first, new isInstanceOf<VMIntInstanceRef>()); 325 expect(context.variables.first, new isInstanceOf<VMIntInstanceRef>());
326 expect(context.parent.length, equals(0)); 326 expect(context.parent.length, equals(0));
327 }); 327 });
328 328
329 test("a type", () async { 329 test("a type", () async {
330 var value = await _evaluate("<int>[].runtimeType"); 330 var value = await _evaluate("<int>[].runtimeType");
331 331
332 expect(value, new isInstanceOf<VMTypeInstanceRef>()); 332 expect(value, new isInstanceOf<VMTypeInstanceRef>());
333 expect(value.name, equals("_GrowableList<int>")); 333 expect(value.name, equals("List<int>"));
334 expect(value.typeClass.name, equals("_GrowableList")); 334 expect(value.typeClass.name, equals("_GrowableList"));
335 335
336 value = await value.load(); 336 value = await value.load();
337 var arguments = value.arguments; 337 var arguments = value.arguments;
338 expect(arguments.name, equals("<int>")); 338 expect(arguments.name, equals("<int>"));
339 339
340 arguments = await arguments.load(); 340 arguments = await arguments.load();
341 expect(arguments.types, hasLength(1)); 341 expect(arguments.types, hasLength(1));
342 expect(arguments.types.first, new isInstanceOf<VMTypeInstanceRef>()); 342 expect(arguments.types.first, new isInstanceOf<VMTypeInstanceRef>());
343 expect(arguments.types.first.name, equals("int")); 343 expect(arguments.types.first.name, equals("int"));
344 }); 344 });
345 }); 345 });
346 } 346 }
347 347
348 Future<VMInstanceRef> _evaluate(String expression) async { 348 Future<VMInstanceRef> _evaluate(String expression) async {
349 var isolate = await (await client.getVM()).isolates.first.load(); 349 var isolate = await (await client.getVM()).isolates.first.load();
350 return await isolate.rootLibrary.evaluate(expression); 350 return await isolate.rootLibrary.evaluate(expression);
351 } 351 }
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | test/isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698