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

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

Issue 2528623002: Disable kernel unit tests. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: pkg/kernel/test/type_hashcode_test.dart
diff --git a/pkg/kernel/test/type_hashcode_test.dart b/pkg/kernel/test/type_hashcode_test.dart
deleted file mode 100644
index 468deb6840a4296c87ffd19d21fd46ddc50278a0..0000000000000000000000000000000000000000
--- a/pkg/kernel/test/type_hashcode_test.dart
+++ /dev/null
@@ -1,40 +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/kernel.dart';
-import 'type_parser.dart';
-import 'type_unification_test.dart' show testCases;
-import 'package:test/test.dart';
-
-void checkHashCodeEquality(DartType type1, DartType type2) {
- if (type1 == type2 && type1.hashCode != type2.hashCode) {
- fail('Equal types with different hash codes: $type1 and $type2');
- }
-}
-
-const int MinimumSmi = -(1 << 30);
-const int MaximumSmi = (1 << 30) - 1;
-
-bool isSmallInteger(int hash) {
- return MinimumSmi <= hash && hash <= MaximumSmi;
-}
-
-void checkHashCodeRange(DartType type) {
- int hash = type.hashCode;
- if (!isSmallInteger(hash)) {
- fail('Hash code for $type is not a SMI: $hash');
- }
-}
-
-void main() {
- for (var testCase in testCases) {
- test('$testCase', () {
- var env = new LazyTypeEnvironment();
- var type1 = env.parse(testCase.type1);
- var type2 = env.parse(testCase.type2);
- checkHashCodeEquality(type1, type2);
- checkHashCodeRange(type1);
- checkHashCodeRange(type2);
- });
- }
-}
« no previous file with comments | « pkg/kernel/test/baseline_type_propagation_test_disabled.dart ('k') | pkg/kernel/test/type_hashcode_test_disabled.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698