Index: pkg/kernel/test/baseline_strong_mode_test_disabled.dart |
diff --git a/pkg/kernel/test/baseline_strong_mode_test_disabled.dart b/pkg/kernel/test/baseline_strong_mode_test_disabled.dart |
deleted file mode 100644 |
index 51d2a7c032e49f1b35cb1548a97e34d8ad16328f..0000000000000000000000000000000000000000 |
--- a/pkg/kernel/test/baseline_strong_mode_test_disabled.dart |
+++ /dev/null |
@@ -1,63 +0,0 @@ |
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
-import 'package:kernel/class_hierarchy.dart'; |
-import 'package:kernel/core_types.dart'; |
-import 'package:kernel/kernel.dart'; |
-import 'package:kernel/transformations/mixin_full_resolution.dart'; |
-import 'package:kernel/type_checker.dart'; |
-import 'package:path/path.dart' as pathlib; |
- |
-import 'baseline_tester.dart'; |
- |
-class StrongModeTest extends TestTarget { |
- @override |
- List<String> get extraRequiredLibraries => []; |
- |
- @override |
- String get name => 'strong-mode-test'; |
- |
- @override |
- bool get strongMode => true; |
- |
- @override |
- List<String> transformProgram(Program program) { |
- List<String> errors = <String>[]; |
- new MixinFullResolution().transform(program); |
- new TestTypeChecker( |
- errors, new CoreTypes(program), new ClassHierarchy(program)) |
- .checkProgram(program); |
- return errors; |
- } |
-} |
- |
-class TestTypeChecker extends TypeChecker { |
- final List<String> errors; |
- |
- TestTypeChecker(this.errors, CoreTypes coreTypes, ClassHierarchy hierarchy) |
- : super(coreTypes, hierarchy); |
- |
- @override |
- void checkAssignable(TreeNode where, DartType from, DartType to) { |
- if (!environment.isSubtypeOf(from, to)) { |
- fail(where, '$from is not a subtype of $to'); |
- } |
- } |
- |
- @override |
- void fail(TreeNode where, String message) { |
- var location = where.location; |
- var locationString; |
- if (location != null) { |
- var file = pathlib.basename(Uri.parse(location.file).path); |
- locationString = '($file:${location.line}:${location.column})'; |
- } else { |
- locationString = '(no location)'; |
- } |
- errors.add('$message $locationString'); |
- } |
-} |
- |
-void main() { |
- runBaselineTests('strong-mode', new StrongModeTest()); |
-} |