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

Side by Side Diff: pkg/kernel/test/type_substitution_identity_test.dart

Issue 2528623002: Disable kernel unit tests. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4 import 'package:kernel/kernel.dart';
5 import 'package:kernel/type_algebra.dart';
6 import 'type_parser.dart';
7 import 'type_unification_test.dart' show testCases;
8 import 'package:test/test.dart';
9
10 checkType(DartType type) {
11 var map = {new TypeParameter(): const DynamicType()};
12 var other = substitute(type, map);
13 if (!identical(type, other)) {
14 fail('Identity substitution test failed for $type');
15 }
16 other = Substitution.fromUpperAndLowerBounds(map, map).substituteType(type);
17 if (!identical(type, other)) {
18 fail('Identity bounded substitution test failed for $type');
19 }
20 }
21
22 main() {
23 for (var testCase in testCases) {
24 test('$testCase', () {
25 var env = new LazyTypeEnvironment();
26 checkType(env.parse(testCase.type1));
27 checkType(env.parse(testCase.type2));
28 });
29 }
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698