| 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 analyzer.test.src.context.mock_sdk; | 5 library analyzer.test.src.context.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/cache.dart'; | 9 import 'package:analyzer/src/context/cache.dart'; |
| 10 import 'package:analyzer/src/context/context.dart'; | 10 import 'package:analyzer/src/context/context.dart'; |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 ''' | 376 ''' |
| 377 library dart.math; | 377 library dart.math; |
| 378 | 378 |
| 379 const double E = 2.718281828459045; | 379 const double E = 2.718281828459045; |
| 380 const double PI = 3.1415926535897932; | 380 const double PI = 3.1415926535897932; |
| 381 const double LN10 = 2.302585092994046; | 381 const double LN10 = 2.302585092994046; |
| 382 | 382 |
| 383 T min<T extends num>(T a, T b) => null; | 383 T min<T extends num>(T a, T b) => null; |
| 384 T max<T extends num>(T a, T b) => null; | 384 T max<T extends num>(T a, T b) => null; |
| 385 | 385 |
| 386 external double cos(num x); | 386 external double cos(num radians); |
| 387 external double sin(num x); | 387 external double sin(num radians); |
| 388 external double sqrt(num x); | 388 external double sqrt(num radians); |
| 389 class Random { | 389 class Random { |
| 390 bool nextBool() => true; | 390 bool nextBool() => true; |
| 391 double nextDouble() => 2.0; | 391 double nextDouble() => 2.0; |
| 392 int nextInt() => 1; | 392 int nextInt() => 1; |
| 393 } | 393 } |
| 394 '''); | 394 '''); |
| 395 | 395 |
| 396 const List<SdkLibrary> _LIBRARIES = const [ | 396 const List<SdkLibrary> _LIBRARIES = const [ |
| 397 _LIB_CORE, | 397 _LIB_CORE, |
| 398 _LIB_ASYNC, | 398 _LIB_ASYNC, |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 624 |
| 625 @override | 625 @override |
| 626 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 626 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
| 627 if (factory == null) { | 627 if (factory == null) { |
| 628 return super.createCacheFromSourceFactory(factory); | 628 return super.createCacheFromSourceFactory(factory); |
| 629 } | 629 } |
| 630 return new AnalysisCache( | 630 return new AnalysisCache( |
| 631 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 631 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 632 } | 632 } |
| 633 } | 633 } |
| OLD | NEW |