| 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/context/context.dart'; | 9 import 'package:analyzer/src/context/context.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 static const MockSdkLibrary LIB_MATH = const MockSdkLibrary( | 218 static const MockSdkLibrary LIB_MATH = const MockSdkLibrary( |
| 219 'dart:math', | 219 'dart:math', |
| 220 '/lib/math/math.dart', | 220 '/lib/math/math.dart', |
| 221 ''' | 221 ''' |
| 222 library dart.math; | 222 library dart.math; |
| 223 const double E = 2.718281828459045; | 223 const double E = 2.718281828459045; |
| 224 const double PI = 3.1415926535897932; | 224 const double PI = 3.1415926535897932; |
| 225 const double LN10 = 2.302585092994046; | 225 const double LN10 = 2.302585092994046; |
| 226 T min<T extends num>(T a, T b) => null; | 226 T min<T extends num>(T a, T b) => null; |
| 227 T max<T extends num>(T a, T b) => null; | 227 T max<T extends num>(T a, T b) => null; |
| 228 external double cos(num x); | 228 external double cos(num radians); |
| 229 external num pow(num x, num exponent); | 229 external num pow(num x, num exponent); |
| 230 external double sin(num x); | 230 external double sin(num radians); |
| 231 external double sqrt(num x); | 231 external double sqrt(num x); |
| 232 class Random { | 232 class Random { |
| 233 bool nextBool() => true; | 233 bool nextBool() => true; |
| 234 double nextDouble() => 2.0; | 234 double nextDouble() => 2.0; |
| 235 int nextInt() => 1; | 235 int nextInt() => 1; |
| 236 } | 236 } |
| 237 '''); | 237 '''); |
| 238 | 238 |
| 239 static const MockSdkLibrary LIB_HTML = const MockSdkLibrary( | 239 static const MockSdkLibrary LIB_HTML = const MockSdkLibrary( |
| 240 'dart:html', | 240 'dart:html', |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 bool get isInternal => shortName.startsWith('dart:_'); | 448 bool get isInternal => shortName.startsWith('dart:_'); |
| 449 | 449 |
| 450 @override | 450 @override |
| 451 bool get isShared => throw unimplemented; | 451 bool get isShared => throw unimplemented; |
| 452 | 452 |
| 453 @override | 453 @override |
| 454 bool get isVmLibrary => throw unimplemented; | 454 bool get isVmLibrary => throw unimplemented; |
| 455 | 455 |
| 456 UnimplementedError get unimplemented => new UnimplementedError(); | 456 UnimplementedError get unimplemented => new UnimplementedError(); |
| 457 } | 457 } |
| OLD | NEW |