| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 testing.mock_sdk; | 5 library testing.mock_sdk; |
| 6 | 6 |
| 7 import 'package:analyzer/file_system/file_system.dart' as resource; | 7 import 'package:analyzer/file_system/file_system.dart' as resource; |
| 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; | 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/sdk.dart'; | 10 import 'package:analyzer/src/generated/sdk.dart'; |
| 11 import 'package:analyzer/src/generated/source.dart'; | 11 import 'package:analyzer/src/generated/source.dart'; |
| 12 | 12 |
| 13 | 13 |
| 14 class MockSdk implements DartSdk { | 14 class MockSdk implements DartSdk { |
| 15 static const _MockSdkLibrary LIB_CORE = | 15 static const _MockSdkLibrary LIB_CORE = |
| 16 const _MockSdkLibrary('dart:core', '/lib/core/core.dart', ''' | 16 const _MockSdkLibrary('dart:core', '/lib/core/core.dart', ''' |
| 17 library dart.core; | 17 library dart.core; |
| 18 | 18 |
| 19 import 'dart:async'; | 19 import 'dart:async'; |
| 20 | 20 |
| 21 class Object { | 21 class Object { |
| 22 bool operator ==(other) => identical(this, other); | 22 bool operator ==(other) => identical(this, other); |
| 23 String toString() => 'a string'; | 23 String toString() => 'a string'; |
| 24 int get hashCode => 0; |
| 24 } | 25 } |
| 25 | 26 |
| 26 class Function {} | 27 class Function {} |
| 27 class StackTrace {} | 28 class StackTrace {} |
| 28 class Symbol {} | 29 class Symbol {} |
| 29 class Type {} | 30 class Type {} |
| 30 | 31 |
| 31 abstract class Comparable<T> { | 32 abstract class Comparable<T> { |
| 32 int compareTo(T other); | 33 int compareTo(T other); |
| 33 } | 34 } |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 bool get isInternal => throw unimplemented; | 258 bool get isInternal => throw unimplemented; |
| 258 | 259 |
| 259 @override | 260 @override |
| 260 bool get isShared => throw unimplemented; | 261 bool get isShared => throw unimplemented; |
| 261 | 262 |
| 262 @override | 263 @override |
| 263 bool get isVmLibrary => throw unimplemented; | 264 bool get isVmLibrary => throw unimplemented; |
| 264 | 265 |
| 265 UnimplementedError get unimplemented => new UnimplementedError(); | 266 UnimplementedError get unimplemented => new UnimplementedError(); |
| 266 } | 267 } |
| OLD | NEW |