File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 27
27
@interface FooMoreDerivedObjCClass : FooDerivedObjCClass
28
28
@end
29
29
30
+ @interface StringConvertibleInDebugAndOtherwise_ObjC : NSObject
31
+ @end
32
+
30
33
#endif
Original file line number Diff line number Diff line change @@ -31,3 +31,14 @@ @implementation FooDerivedObjCClass : FooObjCClass
31
31
@implementation FooMoreDerivedObjCClass : FooDerivedObjCClass
32
32
@end
33
33
34
+ @implementation StringConvertibleInDebugAndOtherwise_ObjC : NSObject
35
+
36
+ -(NSString *) description {
37
+ return @" description" ;
38
+ }
39
+
40
+ -(NSString *) debugDescription {
41
+ return @" debugDescription" ;
42
+ }
43
+
44
+ @end
Original file line number Diff line number Diff line change @@ -740,14 +740,17 @@ Reflection.test("Name of metatype of artificial subclass") {
740
740
expectEqual ( String ( reflecting: type ( of: obj) ) , " a.TestArtificialSubclass " )
741
741
}
742
742
743
- @objc class StringConvertibleInDebugAndOtherwise : NSObject {
743
+ @objc class StringConvertibleInDebugAndOtherwise_Native : NSObject {
744
744
override var description : String { return " description " }
745
745
override var debugDescription : String { return " debugDescription " }
746
746
}
747
747
748
748
Reflection . test ( " NSObject is properly CustomDebugStringConvertible " ) {
749
- let object = StringConvertibleInDebugAndOtherwise ( )
750
- expectEqual ( String ( reflecting: object) , object. debugDescription)
749
+ let objectNative = StringConvertibleInDebugAndOtherwise_Native ( )
750
+ let objectObjC = StringConvertibleInDebugAndOtherwise_ObjC ( )
751
+
752
+ expectEqual ( String ( reflecting: objectNative) , objectNative. debugDescription)
753
+ expectEqual ( String ( reflecting: objectObjC) , objectObjC. debugDescription)
751
754
}
752
755
753
756
Reflection . test ( " NSRange QuickLook " ) {
You can’t perform that action at this time.
0 commit comments