@@ -12,13 +12,15 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
12
12
AfterDocumentablesTransformation { m =>
13
13
m.visitMembers { x =>
14
14
if (x.getName == " C1" ) {
15
- assertEquals(List (" A1" , " A2[Int]" , " A3[Int, String]" , " Any" , " B1" , " B2" , " B3" , " Object" ), x.getParentsAsStrings)
15
+ assertEquals(List (" A1" , " A2[Int]" , " A3[Int, String]" , " Any" , " B1" , " B2" , " B3" , " Matchable " , " Object" ), x.getParentsAsStrings)
16
16
assertEquals(List (" B1" , " B2" , " B3" ), x.getDirectParentsAsStrings)
17
17
assertEquals(List (" E1" , " E2" ), x.getKnownChildrenAsStrings)
18
- val graph = MemberExtension .getFrom(x).map(_.graph)
18
+ val graph = MemberExtension .getFrom(x).map(_.graph)
19
19
assertTrue(" Graph is empty!" , graph.isDefined)
20
20
assertEquals(
21
21
Set (
22
+ " Object" -> " Matchable" ,
23
+ " Matchable" -> " Any" ,
22
24
" Object" -> " Any" ,
23
25
" A1" -> " Object" ,
24
26
" A2[Int]" -> " Object" ,
@@ -42,15 +44,15 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
42
44
)
43
45
}
44
46
if (x.getName == " E2" ) {
45
- assertEquals(List (" A1" , " A2[Int]" , " A3[Int, String]" , " Any" , " B1" , " B2" , " B3" , " C1[Int, Boolean, Any]" , " D2[Int, Boolean]" , " D3" , " Object" ), x.getParentsAsStrings)
47
+ assertEquals(List (" A1" , " A2[Int]" , " A3[Int, String]" , " Any" , " B1" , " B2" , " B3" , " C1[Int, Boolean, Any]" , " D2[Int, Boolean]" , " D3" , " Matchable " , " Object" ), x.getParentsAsStrings)
46
48
assertEquals(List (" C1[Int, Boolean, Any]" , " D2[Int, Boolean]" , " D3" ), x.getDirectParentsAsStrings)
47
49
assertEquals(List .empty, x.getKnownChildrenAsStrings)
48
- val graph = MemberExtension .getFrom(x).map(_.graph)
50
+ val graph = MemberExtension .getFrom(x).map(_.graph)
49
51
assertTrue(" Graph is empty!" , graph.isDefined)
50
52
assertEquals(
51
53
Set (
52
54
" Object" -> " Any" ,
53
- // "A1" -> "Object", // These are not applicable beacuase of bug and its workaround
55
+ // "A1" -> "Object", // These are not applicable beacuase of bug and its workaround
54
56
// "A2[Int]" -> "Object", // More info at ClassLikeSupport.scala:37
55
57
// "A3[Int, String]" -> "Object",
56
58
// "B1" -> "Object",
@@ -65,6 +67,8 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
65
67
// "C1[Int, Boolean, Any]" -> "B1",
66
68
// "C1[Int, Boolean, Any]" -> "B2",
67
69
// "C1[Int, Boolean, Any]" -> "B3",
70
+ " Object" -> " Matchable" ,
71
+ " Matchable" -> " Any" ,
68
72
" E2" -> " D2[Int, Boolean]" ,
69
73
" E2" -> " D3" ,
70
74
" D2[Int, Boolean]" -> " Object" ,
@@ -75,16 +79,18 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
75
79
)
76
80
}
77
81
if (x.getName == " A2" ) {
78
- assertEquals(List (" Any" , " Object" ), x.getParentsAsStrings)
82
+ assertEquals(List (" Any" , " Matchable " , " Object" ), x.getParentsAsStrings)
79
83
assertEquals(List .empty, x.getDirectParentsAsStrings)
80
84
assertEquals(List (" B2" , " B3" , " C1[A, B, C]" , " E1" , " E2" ), x.getKnownChildrenAsStrings)
81
- val graph = MemberExtension .getFrom(x).map(_.graph)
85
+ val graph = MemberExtension .getFrom(x).map(_.graph)
82
86
assertTrue(" Graph is empty!" , graph.isDefined)
83
87
assertEquals(
84
88
Set (
89
+ " Object" -> " Matchable" ,
90
+ " Matchable" -> " Any" ,
85
91
" Object" -> " Any" ,
86
92
" A2[T]" -> " Object" ,
87
- " B2" -> " A2[T]" , // These are not actually true, becuase we lose information about hierarchy in subtypes and their possible mapping to supertypes other that that type itself, e. g. linking to `Object`
93
+ " B2" -> " A2[T]" , // These are not actually true, becuase we lose information about hierarchy in subtypes and their possible mapping to supertypes other that that type itself, e. g. linking to `Object`
88
94
" B3" -> " A2[T]" ,
89
95
" C1[A, B, C]" -> " A2[T]" ,
90
96
" E1" -> " A2[T]" ,
@@ -95,4 +101,4 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
95
101
}
96
102
}
97
103
}
98
- )
104
+ )
0 commit comments