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

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

Issue 2922533002: Start implementing IncrementalClassHierarchy. (Closed)
Patch Set: Fixes for review comments. Created 3 years, 6 months 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
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:kernel/ast.dart'; 5 import 'package:kernel/ast.dart';
6 import 'package:kernel/class_hierarchy.dart'; 6 import 'package:kernel/class_hierarchy.dart';
7 import 'package:kernel/core_types.dart'; 7 import 'package:kernel/core_types.dart';
8 import 'package:kernel/src/incremental_class_hierarchy.dart';
8 import 'package:kernel/testing/mock_sdk_program.dart'; 9 import 'package:kernel/testing/mock_sdk_program.dart';
9 import 'package:kernel/text/ast_to_text.dart'; 10 import 'package:kernel/text/ast_to_text.dart';
10 import 'package:kernel/type_algebra.dart'; 11 import 'package:kernel/type_algebra.dart';
11 import 'package:test/test.dart'; 12 import 'package:test/test.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; 13 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 14
14 main() { 15 main() {
15 defineReflectiveSuite(() { 16 defineReflectiveSuite(() {
16 defineReflectiveTests(ClosedWorldClassHierarchyTest); 17 defineReflectiveTests(ClosedWorldClassHierarchyTest);
18 defineReflectiveTests(IncrementalClassHierarchyTest);
17 }); 19 });
18 } 20 }
19 21
20 @reflectiveTest 22 @reflectiveTest
21 class ClosedWorldClassHierarchyTest extends _ClassHierarchyTest { 23 class ClosedWorldClassHierarchyTest extends _ClassHierarchyTest {
22 ClassHierarchy createClassHierarchy(Program program) { 24 ClassHierarchy createClassHierarchy(Program program) {
23 return new ClosedWorldClassHierarchy(program); 25 return new ClosedWorldClassHierarchy(program);
24 } 26 }
25 } 27 }
26 28
29 @reflectiveTest
30 class IncrementalClassHierarchyTest extends _ClassHierarchyTest {
31 ClassHierarchy createClassHierarchy(Program program) {
32 return new IncrementalClassHierarchy();
33 }
34
35 @failingTest
36 void test_forEachOverridePair_overrideSupertype() {
37 super.test_forEachOverridePair_overrideSupertype();
38 }
39
40 @failingTest
41 void test_getClassAsInstanceOf_generic_extends() {
42 super.test_getClassAsInstanceOf_generic_extends();
43 }
44
45 @failingTest
46 void test_getClassAsInstanceOf_generic_implements() {
47 super.test_getClassAsInstanceOf_generic_implements();
48 }
49
50 @failingTest
51 void test_getClassAsInstanceOf_generic_with() {
52 super.test_getClassAsInstanceOf_generic_with();
53 }
54
55 @failingTest
56 void test_getClassAsInstanceOf_notGeneric_extends() {
57 super.test_getClassAsInstanceOf_notGeneric_extends();
58 }
59
60 @failingTest
61 void test_getClassAsInstanceOf_notGeneric_implements() {
62 super.test_getClassAsInstanceOf_notGeneric_implements();
63 }
64
65 @failingTest
66 void test_getClassAsInstanceOf_notGeneric_with() {
67 super.test_getClassAsInstanceOf_notGeneric_with();
68 }
69
70 @failingTest
71 void test_getClassicLeastUpperBound_expansive() {
72 super.test_getClassicLeastUpperBound_expansive();
73 }
74
75 @failingTest
76 void test_getClassicLeastUpperBound_generic() {
77 super.test_getClassicLeastUpperBound_generic();
78 }
79
80 @failingTest
81 void test_getClassicLeastUpperBound_nonGeneric() {
82 super.test_getClassicLeastUpperBound_nonGeneric();
83 }
84
85 @failingTest
86 void test_getDispatchTarget() {
87 super.test_getDispatchTarget();
88 }
89
90 @failingTest
91 void test_getDispatchTarget_abstract() {
92 super.test_getDispatchTarget_abstract();
93 }
94
95 @failingTest
96 void test_getInterfaceMember_extends() {
97 super.test_getInterfaceMember_extends();
98 }
99
100 @failingTest
101 void test_getInterfaceMember_implements() {
102 super.test_getInterfaceMember_implements();
103 }
104
105 @failingTest
106 void test_getRankedSuperclasses() {
107 super.test_getRankedSuperclasses();
108 }
109
110 @failingTest
111 void test_getTypeAsInstanceOf_generic_extends() {
112 super.test_getTypeAsInstanceOf_generic_extends();
113 }
114 }
115
27 abstract class _ClassHierarchyTest { 116 abstract class _ClassHierarchyTest {
28 Program program; 117 Program program;
29 CoreTypes coreTypes; 118 CoreTypes coreTypes;
30 119
31 /// The test library. 120 /// The test library.
32 Library library; 121 Library library;
33 122
34 ClassHierarchy _hierarchy; 123 ClassHierarchy _hierarchy;
35 124
36 /// Return the new or existing instance of [ClassHierarchy]. 125 /// Return the new or existing instance of [ClassHierarchy].
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 actualText = actualText.replaceAll(' extends core::Object', ''); 854 actualText = actualText.replaceAll(' extends core::Object', '');
766 855
767 // if (actualText != expectedText) { 856 // if (actualText != expectedText) {
768 // print('-------- Actual --------'); 857 // print('-------- Actual --------');
769 // print(actualText + '------------------------'); 858 // print(actualText + '------------------------');
770 // } 859 // }
771 860
772 expect(actualText, expectedText); 861 expect(actualText, expectedText);
773 } 862 }
774 } 863 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698