| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:kernel/ast.dart'; | 5 import 'package:kernel/ast.dart'; |
| 6 | 6 |
| 7 /// Returns a [Program] object containing empty definitions of core SDK classes. | 7 /// Returns a [Program] object containing empty definitions of core SDK classes. |
| 8 Program createMockSdkProgram() { | 8 Program createMockSdkProgram() { |
| 9 var coreLib = new Library(Uri.parse('dart:core'), name: 'dart.core'); | 9 var coreLib = new Library(Uri.parse('dart:core'), name: 'dart.core'); |
| 10 var asyncLib = new Library(Uri.parse('dart:async'), name: 'dart.async'); | 10 var asyncLib = new Library(Uri.parse('dart:async'), name: 'dart.async'); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 addClass(coreLib, class_('double', supertype: num.asThisSupertype)); | 56 addClass(coreLib, class_('double', supertype: num.asThisSupertype)); |
| 57 addClass(coreLib, class_('Iterator', typeParameters: [typeParam('T')])); | 57 addClass(coreLib, class_('Iterator', typeParameters: [typeParam('T')])); |
| 58 addClass(coreLib, class_('Symbol')); | 58 addClass(coreLib, class_('Symbol')); |
| 59 addClass(coreLib, class_('Type')); | 59 addClass(coreLib, class_('Type')); |
| 60 addClass(coreLib, class_('Function')); | 60 addClass(coreLib, class_('Function')); |
| 61 addClass(coreLib, class_('Invocation')); | 61 addClass(coreLib, class_('Invocation')); |
| 62 addClass(asyncLib, class_('Future', typeParameters: [typeParam('T')])); | 62 addClass(asyncLib, class_('Future', typeParameters: [typeParam('T')])); |
| 63 addClass(asyncLib, class_('Stream', typeParameters: [typeParam('T')])); | 63 addClass(asyncLib, class_('Stream', typeParameters: [typeParam('T')])); |
| 64 addClass(internalLib, class_('Symbol')); | 64 addClass(internalLib, class_('Symbol')); |
| 65 | 65 |
| 66 return new Program([coreLib, asyncLib, internalLib]); | 66 return new Program(libraries: [coreLib, asyncLib, internalLib]); |
| 67 } | 67 } |
| OLD | NEW |