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

Side by Side Diff: tests/isolate/message3_test.dart

Issue 1221503004: Reclaim the CreatedFromSnapshot bit and use it to indicate VM Heap object (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-code-review-comments Created 5 years, 4 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 | « tests/isolate/isolate.status ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Dart test program for testing serialization of messages. 5 // Dart test program for testing serialization of messages.
6 // VMOptions=--enable_type_checks --enable_asserts 6 // VMOptions=--enable_type_checks --enable_asserts
7 7
8 library MessageTest; 8 library MessageTest;
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 ping.send(g2); 387 ping.send(g2);
388 ping.send(g3); 388 ping.send(g3);
389 389
390 checks.add((x) { // g1. 390 checks.add((x) { // g1.
391 Expect.isTrue(x is G); 391 Expect.isTrue(x is G);
392 Expect.isFalse(identical(g1, x)); 392 Expect.isFalse(identical(g1, x));
393 F f = x.field; 393 F f = x.field;
394 Expect.equals("field", f.field); 394 Expect.equals("field", f.field);
395 Expect.isFalse(identical(nonConstF, f)); 395 Expect.isFalse(identical(nonConstF, f));
396 }); 396 });
397 checks.add((x) { // g1. 397 checks.add((x) { // g2.
398 Expect.isTrue(x is G); 398 Expect.isTrue(x is G);
399 Expect.isFalse(identical(g1, x)); 399 Expect.isFalse(identical(g1, x));
400 F f = x.field; 400 F f = x.field;
401 Expect.equals("field", f.field); 401 Expect.equals("field", f.field);
402 Expect.identical(constF, f); /// constInstance: continued 402 Expect.identical(constF, f); /// constInstance: continued
403 }); 403 });
404 checks.add((x) { // g3. 404 checks.add((x) { // g3.
405 Expect.isTrue(x is G); 405 Expect.isTrue(x is G);
406 Expect.identical(g1, x); /// constInstance: continued 406 Expect.identical(g3, x); /// constInstance: continued
407 F f = x.field; 407 F f = x.field;
408 Expect.equals("field", f.field); 408 Expect.equals("field", f.field);
409 Expect.identical(constF, f); /// constInstance: continued 409 Expect.identical(constF, f); /// constInstance: continued
410 }); 410 });
411 411
412 // Make sure objects in a map are serialized and deserialized in the correct 412 // Make sure objects in a map are serialized and deserialized in the correct
413 // order. 413 // order.
414 Map m = new Map(); 414 Map m = new Map();
415 Value val1 = new Value(1); 415 Value val1 = new Value(1);
416 Value val2 = new Value(2); 416 Value val2 = new Value(2);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 .spawn(echoMain, [initialReplyPort.sendPort, testPort.sendPort]) 453 .spawn(echoMain, [initialReplyPort.sendPort, testPort.sendPort])
454 .then((_) => initialReplyPort.first) 454 .then((_) => initialReplyPort.first)
455 .then((SendPort ping) { 455 .then((SendPort ping) {
456 runTests(ping, checks); 456 runTests(ping, checks);
457 Expect.isTrue(checks.length > 0); 457 Expect.isTrue(checks.length > 0);
458 completer.future 458 completer.future
459 .then((_) => ping.send("halt")) 459 .then((_) => ping.send("halt"))
460 .then((_) => asyncEnd()); 460 .then((_) => asyncEnd());
461 }); 461 });
462 } 462 }
OLDNEW
« no previous file with comments | « tests/isolate/isolate.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698