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

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

Issue 2922533002: Start implementing IncrementalClassHierarchy. (Closed)
Patch Set: 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:test/test.dart'; 11 import 'package:test/test.dart';
11 import 'package:test_reflective_loader/test_reflective_loader.dart'; 12 import 'package:test_reflective_loader/test_reflective_loader.dart';
12 13
13 main() { 14 main() {
14 defineReflectiveSuite(() { 15 defineReflectiveSuite(() {
15 defineReflectiveTests(ClosedWorldClassHierarchyTest); 16 defineReflectiveTests(ClosedWorldClassHierarchyTest);
17 defineReflectiveTests(IncrementalClassHierarchyTest);
16 }); 18 });
17 } 19 }
18 20
19 @reflectiveTest 21 @reflectiveTest
20 class ClosedWorldClassHierarchyTest extends _ClassHierarchyTest { 22 class ClosedWorldClassHierarchyTest extends _ClassHierarchyTest {
21 ClassHierarchy createClassHierarchy(Program program) { 23 ClassHierarchy createClassHierarchy(Program program) {
22 return new ClosedWorldClassHierarchy(program); 24 return new ClosedWorldClassHierarchy(program);
23 } 25 }
24 } 26 }
25 27
28 @reflectiveTest
29 class IncrementalClassHierarchyTest extends _ClassHierarchyTest {
30 ClassHierarchy createClassHierarchy(Program program) {
31 return new IncrementalClassHierarchy();
32 }
33
34 @failingTest
35 void test_forEachOverridePair_overrideSupertype() {
36 super.test_forEachOverridePair_overrideSupertype();
37 }
38
39 @failingTest
40 void test_getClassAsInstanceOf_generic_extends() {
41 super.test_getClassAsInstanceOf_generic_extends();
42 }
43
44 @failingTest
45 void test_getClassAsInstanceOf_generic_implements() {
46 super.test_getClassAsInstanceOf_generic_implements();
47 }
48
49 @failingTest
50 void test_getClassAsInstanceOf_generic_with() {
51 super.test_getClassAsInstanceOf_generic_with();
52 }
53
54 @failingTest
55 void test_getClassAsInstanceOf_notGeneric_extends() {
56 super.test_getClassAsInstanceOf_notGeneric_extends();
57 }
58
59 @failingTest
60 void test_getClassAsInstanceOf_notGeneric_implements() {
61 super.test_getClassAsInstanceOf_notGeneric_implements();
62 }
63
64 @failingTest
65 void test_getClassAsInstanceOf_notGeneric_with() {
66 super.test_getClassAsInstanceOf_notGeneric_with();
67 }
68
69 @failingTest
70 void test_getClassicLeastUpperBound_generic() {
71 super.test_getClassicLeastUpperBound_generic();
72 }
73
74 @failingTest
75 void test_getClassicLeastUpperBound_nonGeneric() {
76 super.test_getClassicLeastUpperBound_nonGeneric();
77 }
78
79 @failingTest
80 void test_getDispatchTarget() {
81 super.test_getDispatchTarget();
82 }
83
84 @failingTest
85 void test_getDispatchTarget_abstract() {
86 super.test_getDispatchTarget_abstract();
87 }
88
89 @failingTest
90 void test_getInterfaceMember_extends() {
91 super.test_getInterfaceMember_extends();
92 }
93
94 @failingTest
95 void test_getInterfaceMember_implements() {
96 super.test_getInterfaceMember_implements();
97 }
98
99 @failingTest
100 void test_getRankedSuperclasses() {
101 super.test_getRankedSuperclasses();
102 }
103
104 @failingTest
105 void test_getTypeAsInstanceOf_generic_extends() {
106 super.test_getTypeAsInstanceOf_generic_extends();
107 }
108
109 @failingTest
110 void test_rootClass() {
111 super.test_rootClass();
112 }
113 }
114
26 abstract class _ClassHierarchyTest { 115 abstract class _ClassHierarchyTest {
27 Program program; 116 Program program;
28 CoreTypes coreTypes; 117 CoreTypes coreTypes;
29 118
30 /// The test library. 119 /// The test library.
31 Library library; 120 Library library;
32 121
33 ClassHierarchy _hierarchy; 122 ClassHierarchy _hierarchy;
34 123
35 /// Return the new or existing instance of [ClassHierarchy]. 124 /// Return the new or existing instance of [ClassHierarchy].
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 actualText = actualText.replaceAll(' extends core::Object', ''); 781 actualText = actualText.replaceAll(' extends core::Object', '');
693 782
694 // if (actualText != expectedText) { 783 // if (actualText != expectedText) {
695 // print('-------- Actual --------'); 784 // print('-------- Actual --------');
696 // print(actualText + '------------------------'); 785 // print(actualText + '------------------------');
697 // } 786 // }
698 787
699 expect(actualText, expectedText); 788 expect(actualText, expectedText);
700 } 789 }
701 } 790 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698