Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: pkg/kernel/test/baseline_strong_mode_test_disabled.dart

Issue 2548833002: Re-enable kernel unit tests on platforms where they are supported. (Closed)
Patch Set: Also enable hashcode test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/test/baseline_strong_mode_test.dart ('k') | pkg/kernel/test/baseline_type_propagation_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
-}
« no previous file with comments | « pkg/kernel/test/baseline_strong_mode_test.dart ('k') | pkg/kernel/test/baseline_type_propagation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698