| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Tests that run the checker end-to-end using the file system, but with a mock | 5 /// Tests that run the checker end-to-end using the file system, but with a mock |
| 6 /// SDK. | 6 /// SDK. |
| 7 library ddc.test.end_to_end; | 7 library ddc.test.end_to_end; |
| 8 | 8 |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 import 'package:ddc/devc.dart' show compile; | 10 import 'package:dev_compiler/devc.dart' show compile; |
| 11 import 'package:ddc/src/checker/dart_sdk.dart' show mockSdkSources; | 11 import 'package:dev_compiler/src/checker/dart_sdk.dart' show mockSdkSources; |
| 12 import 'package:ddc/src/checker/resolver.dart' show TypeResolver; | 12 import 'package:dev_compiler/src/checker/resolver.dart' show TypeResolver; |
| 13 import 'package:ddc/src/options.dart'; | 13 import 'package:dev_compiler/src/options.dart'; |
| 14 import 'package:ddc/src/report.dart'; | 14 import 'package:dev_compiler/src/report.dart'; |
| 15 import 'package:path/path.dart' as path; | 15 import 'package:path/path.dart' as path; |
| 16 import 'package:unittest/unittest.dart'; | 16 import 'package:unittest/unittest.dart'; |
| 17 | 17 |
| 18 main() { | 18 main() { |
| 19 var options = new CompilerOptions(); | 19 var options = new CompilerOptions(); |
| 20 var mockSdk = new TypeResolver.fromMock(mockSdkSources, options); | 20 var mockSdk = new TypeResolver.fromMock(mockSdkSources, options); |
| 21 | 21 |
| 22 var testDir = path.absolute(path.dirname(Platform.script.path)); | 22 var testDir = path.absolute(path.dirname(Platform.script.path)); |
| 23 | 23 |
| 24 _check(testfile) { | 24 _check(testfile) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 41 test('checker tests runtime checks', () { | 41 test('checker tests runtime checks', () { |
| 42 // TODO(sigmund,vsm): Check output for invalid checks. | 42 // TODO(sigmund,vsm): Check output for invalid checks. |
| 43 _check('samples/runtimetypechecktest'); | 43 _check('samples/runtimetypechecktest'); |
| 44 }); | 44 }); |
| 45 | 45 |
| 46 test('checker tests return values', () { | 46 test('checker tests return values', () { |
| 47 // TODO(vsm): Check for conversions. | 47 // TODO(vsm): Check for conversions. |
| 48 _check('samples/return_test'); | 48 _check('samples/return_test'); |
| 49 }); | 49 }); |
| 50 } | 50 } |
| OLD | NEW |