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 2727@interface FooMoreDerivedObjCClass : FooDerivedObjCClass
2828@end
2929
30+ @interface StringConvertibleInDebugAndOtherwise_ObjC : NSObject
31+ @end
32+
3033#endif
Original file line number Diff line number Diff line change @@ -31,3 +31,14 @@ @implementation FooDerivedObjCClass : FooObjCClass
3131@implementation FooMoreDerivedObjCClass : FooDerivedObjCClass
3232@end
3333
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") {
740740 expectEqual ( String ( reflecting: type ( of: obj) ) , " a.TestArtificialSubclass " )
741741}
742742
743- @objc class StringConvertibleInDebugAndOtherwise : NSObject {
743+ @objc class StringConvertibleInDebugAndOtherwise_Native : NSObject {
744744 override var description : String { return " description " }
745745 override var debugDescription : String { return " debugDescription " }
746746}
747747
748748Reflection . 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)
751754}
752755
753756Reflection . test ( " NSRange QuickLook " ) {
You can’t perform that action at this time.
0 commit comments