diff options
| author | Arslaan Pathan <[email protected]> | 2026-10-03 22:56:12 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-10-03 22:56:12 +1300 |
| commit | 491a0ae5b62ce235253b9837d04075160f60fede (patch) | |
| tree | 90b790ec7505acc2755c514a6b2f493cd8a9fe63 /tests/Introspection.m | |
| parent | f1a8501ff7343ec253ce96e06b621ed8fedf08cd (diff) | |
| download | Paradox-491a0ae5b62ce235253b9837d04075160f60fede.tar.xz Paradox-491a0ae5b62ce235253b9837d04075160f60fede.zip | |
add more introspection stuff (and half-written Introspection test)
Diffstat (limited to 'tests/Introspection.m')
| -rw-r--r-- | tests/Introspection.m | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/Introspection.m b/tests/Introspection.m new file mode 100644 index 0000000..d54cc0f --- /dev/null +++ b/tests/Introspection.m @@ -0,0 +1,23 @@ +#include <Paradox/Core.h> +#include <stdio.h> + +@interface MyClass : PXObject +- (void)sayHello; +@end + +@implementation MyClass + +- (void)sayHello { + printf("Hello!"); +} + +@end + +int main(void) { + printf("Object introspection test\n"); + MyClass *instance = [MyClass new]; + printf("class = %s\n", class_getName([instance class])); + printf("superclass = %s\n", class_getName([instance superclass])); + printf("className = %s\n", [instance className]); + printf("isMemberOfClass:MyClass = %s\n", [object isMemberOfClass:[MyClass class]]); +} |
