Overview
Comment: | Merge trunk into branch "objfwtest" |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | objfwtest |
Files: | files | file ages | folders |
SHA3-256: |
d47c2a18aa92fe35e1f7027d3ac49531 |
User & Date: | js on 2024-02-10 14:02:33 |
Other Links: | branch diff | manifest | tags |
Context
2024-02-10
| ||
14:16 | Merge trunk into branch "objfwtest" check-in: d365229b6e user: js tags: objfwtest | |
14:02 | Merge trunk into branch "objfwtest" check-in: d47c2a18aa user: js tags: objfwtest | |
14:00 | ObjFWTest: Don't rely on +[isSubclassOfClass:] check-in: f5b4f0fa39 user: js tags: trunk | |
13:35 | Migrate OFNumberTests to ObjFWTest check-in: fae3eee5c7 user: js tags: objfwtest | |
Changes
Modified src/test/OTAppDelegate.m from [7058ecd776] to [1f6282da2f].
︙ | ︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #import "OFValue.h" #import "OTTestCase.h" #import "OTAssertionFailedException.h" OF_APPLICATION_DELEGATE(OTAppDelegate) @implementation OTAppDelegate - (OFSet OF_GENERIC(Class) *)testClasses { Class *classes = objc_copyClassList(NULL); OFMutableSet *testClasses; if (classes == NULL) return nil; @try { testClasses = [OFMutableSet set]; for (Class *iter = classes; *iter != Nil; iter++) | > > > > > > > > > > | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #import "OFValue.h" #import "OTTestCase.h" #import "OTAssertionFailedException.h" OF_APPLICATION_DELEGATE(OTAppDelegate) static bool isSubclassOfClass(Class class, Class superclass) { for (Class iter = class; iter != Nil; iter = class_getSuperclass(iter)) if (iter == superclass) return true; return false; } @implementation OTAppDelegate - (OFSet OF_GENERIC(Class) *)testClasses { Class *classes = objc_copyClassList(NULL); OFMutableSet *testClasses; if (classes == NULL) return nil; @try { testClasses = [OFMutableSet set]; for (Class *iter = classes; *iter != Nil; iter++) if (isSubclassOfClass(*iter, [OTTestCase class])) [testClasses addObject: *iter]; } @finally { OFFreeMemory(classes); } [testClasses removeObject: [OTTestCase class]]; |
︙ | ︙ |