| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 part of mocks; |
| 6 |
| 7 class PersistentHandlesMock implements M.PersistentHandles { |
| 8 final Iterable<M.PersistentHandle> elements; |
| 9 final Iterable<M.WeakPersistentHandle> weakElements; |
| 10 |
| 11 const PersistentHandlesMock({this.elements: const [], |
| 12 this.weakElements: const []}); |
| 13 } |
| 14 |
| 15 class PersistentHandleMock implements M.PersistentHandle { |
| 16 final M.ObjectRef object; |
| 17 |
| 18 const PersistentHandleMock({this.object: const InstanceRefMock()}); |
| 19 } |
| 20 |
| 21 class WeakPersistentHandleMock implements M.WeakPersistentHandle { |
| 22 final M.ObjectRef object; |
| 23 final int externalSize; |
| 24 final String peer; |
| 25 final String callbackSymbolName; |
| 26 final String callbackAddress; |
| 27 |
| 28 const WeakPersistentHandleMock({this.object: const InstanceRefMock(), |
| 29 this.externalSize: 0, this.peer: '0x0', |
| 30 this.callbackSymbolName: 'dart::Something()', |
| 31 this.callbackAddress: '0x123456'}); |
| 32 } |
| OLD | NEW |