@@ -12,13 +12,15 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
1212 AfterDocumentablesTransformation { m =>
1313 m.visitMembers { x =>
1414 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)
1616 assertEquals(List (" B1" , " B2" , " B3" ), x.getDirectParentsAsStrings)
1717 assertEquals(List (" E1" , " E2" ), x.getKnownChildrenAsStrings)
18- val graph = MemberExtension .getFrom(x).map(_.graph)
18+ val graph = MemberExtension .getFrom(x).map(_.graph)
1919 assertTrue(" Graph is empty!" , graph.isDefined)
2020 assertEquals(
2121 Set (
22+ " Object" -> " Matchable" ,
23+ " Matchable" -> " Any" ,
2224 " Object" -> " Any" ,
2325 " A1" -> " Object" ,
2426 " A2[Int]" -> " Object" ,
@@ -42,15 +44,15 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
4244 )
4345 }
4446 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)
4648 assertEquals(List (" C1[Int, Boolean, Any]" , " D2[Int, Boolean]" , " D3" ), x.getDirectParentsAsStrings)
4749 assertEquals(List .empty, x.getKnownChildrenAsStrings)
48- val graph = MemberExtension .getFrom(x).map(_.graph)
50+ val graph = MemberExtension .getFrom(x).map(_.graph)
4951 assertTrue(" Graph is empty!" , graph.isDefined)
5052 assertEquals(
5153 Set (
5254 " 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
5456 // "A2[Int]" -> "Object", // More info at ClassLikeSupport.scala:37
5557 // "A3[Int, String]" -> "Object",
5658 // "B1" -> "Object",
@@ -65,6 +67,8 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
6567 // "C1[Int, Boolean, Any]" -> "B1",
6668 // "C1[Int, Boolean, Any]" -> "B2",
6769 // "C1[Int, Boolean, Any]" -> "B3",
70+ " Object" -> " Matchable" ,
71+ " Matchable" -> " Any" ,
6872 " E2" -> " D2[Int, Boolean]" ,
6973 " E2" -> " D3" ,
7074 " D2[Int, Boolean]" -> " Object" ,
@@ -75,16 +79,18 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
7579 )
7680 }
7781 if (x.getName == " A2" ) {
78- assertEquals(List (" Any" , " Object" ), x.getParentsAsStrings)
82+ assertEquals(List (" Any" , " Matchable " , " Object" ), x.getParentsAsStrings)
7983 assertEquals(List .empty, x.getDirectParentsAsStrings)
8084 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)
8286 assertTrue(" Graph is empty!" , graph.isDefined)
8387 assertEquals(
8488 Set (
89+ " Object" -> " Matchable" ,
90+ " Matchable" -> " Any" ,
8591 " Object" -> " Any" ,
8692 " 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`
8894 " B3" -> " A2[T]" ,
8995 " C1[A, B, C]" -> " A2[T]" ,
9096 " E1" -> " A2[T]" ,
@@ -95,4 +101,4 @@ class HierarchyTest extends ScaladocTest("hierarchy"):
95101 }
96102 }
97103 }
98- )
104+ )
0 commit comments