@@ -15,9 +15,9 @@ func cast(_ s: SubT) -> BaseT {
15
15
return cxxCast ( s)
16
16
}
17
17
18
- var TemplatingTestSuite = TestSuite ( " Foreign references work with templates " )
18
+ var InheritanceTestSuite = TestSuite ( " Inheritance of foreign reference types " )
19
19
20
- TemplatingTestSuite . test ( " SubT " ) {
20
+ InheritanceTestSuite . test ( " Templated cast to base " ) {
21
21
let s : SubT = SubT . getSubT ( )
22
22
expectFalse ( s. isBase)
23
23
let sc : BaseT = cast ( s)
@@ -26,23 +26,21 @@ TemplatingTestSuite.test("SubT") {
26
26
expectFalse ( sc. isBase)
27
27
}
28
28
29
- TemplatingTestSuite . test ( " BaseT " ) {
29
+ InheritanceTestSuite . test ( " Templated cast to itself " ) {
30
30
let b : BaseT = BaseT . getBaseT ( )
31
31
expectTrue ( b. isBase)
32
32
let bc : BaseT = cxxCast ( b) // should instantiate I and O both to BaseT
33
33
expectTrue ( bc. isBase)
34
34
}
35
35
36
- TemplatingTestSuite . test ( " DerivedOutOfOrder " ) {
36
+ InheritanceTestSuite . test ( " DerivedOutOfOrder " ) {
37
37
let d = DerivedOutOfOrder . getInstance ( )
38
38
expectEqual ( 123 , d. baseField)
39
39
expectEqual ( 456 , d. derivedField)
40
40
expectEqual ( 789 , d. leafField)
41
41
}
42
42
43
- var FrtInheritanceTestSuite = TestSuite ( " Foreign references in C++ inheritance " )
44
-
45
- FrtInheritanceTestSuite . test ( " ParentChild " ) {
43
+ InheritanceTestSuite . test ( " ParentChild " ) {
46
44
let immortalRefType = ImmortalRefereceExample . returnImmortalRefType ( )
47
45
expectTrue (
48
46
type ( of: immortalRefType) is AnyObject . Type ,
0 commit comments