| OLD | NEW | 
|---|
| 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 library dart.pkg.isolate.test.registry; | 5 library dart.pkg.isolate.test.registry; | 
| 6 | 6 | 
| 7 import 'dart:async'; | 7 import 'dart:async'; | 
| 8 import 'dart:isolate'; | 8 import 'dart:isolate'; | 
| 9 | 9 | 
| 10 import 'package:isolate/isolate_runner.dart'; | 10 import 'package:isolate/isolate_runner.dart'; | 
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 460     RegistryManager regman = new RegistryManager(); | 460     RegistryManager regman = new RegistryManager(); | 
| 461     Registry registry1 = regman.registry; | 461     Registry registry1 = regman.registry; | 
| 462     Registry registry2 = regman.registry; | 462     Registry registry2 = regman.registry; | 
| 463     var l1 = ["x"]; | 463     var l1 = ["x"]; | 
| 464     var l2; | 464     var l2; | 
| 465     return registry1.add(l1, tags: ["y"]).then((removeCapability) { | 465     return registry1.add(l1, tags: ["y"]).then((removeCapability) { | 
| 466       return registry2.lookup().then((entries) { | 466       return registry2.lookup().then((entries) { | 
| 467         expect(entries, hasLength(1)); | 467         expect(entries, hasLength(1)); | 
| 468         l2 = entries.first; | 468         l2 = entries.first; | 
| 469         expect(l2, equals(l1)); | 469         expect(l2, equals(l1)); | 
| 470         // The object for registry2 is not idential the one for registry1. | 470         // The object for registry2 is not identical the one for registry1. | 
| 471         expect(!identical(l1, l2), isTrue); | 471         expect(!identical(l1, l2), isTrue); | 
| 472         // Removeing the registry1 object through registry2 doesn't work. | 472         // Removing the registry1 object through registry2 doesn't work. | 
| 473         return registry2.remove(l1, removeCapability); | 473         return registry2.remove(l1, removeCapability); | 
| 474       }).then((removeSuccess) { | 474       }).then((removeSuccess) { | 
| 475         expect(removeSuccess, isFalse); | 475         expect(removeSuccess, isFalse); | 
| 476         return registry2.remove(l2, removeCapability); | 476         return registry2.remove(l2, removeCapability); | 
| 477       }).then((removeSuccess) { | 477       }).then((removeSuccess) { | 
| 478         expect(removeSuccess, isTrue); | 478         expect(removeSuccess, isTrue); | 
| 479         return registry1.lookup(); | 479         return registry1.lookup(); | 
| 480       }).then((entries) { | 480       }).then((entries) { | 
| 481         expect(entries, isEmpty); | 481         expect(entries, isEmpty); | 
| 482       }); | 482       }); | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 530 } | 530 } | 
| 531 | 531 | 
| 532 class Element { | 532 class Element { | 
| 533   final int id; | 533   final int id; | 
| 534   Element(this.id); | 534   Element(this.id); | 
| 535   int get hashCode => id; | 535   int get hashCode => id; | 
| 536   bool operator ==(Object other) => other is Element && id == other.id; | 536   bool operator ==(Object other) => other is Element && id == other.id; | 
| 537 } | 537 } | 
| 538 | 538 | 
| 539 void topLevelFunction() {} | 539 void topLevelFunction() {} | 
| OLD | NEW | 
|---|