diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Object.m | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/Object.m b/tests/Object.m new file mode 100644 index 0000000..be81b1d --- /dev/null +++ b/tests/Object.m @@ -0,0 +1,26 @@ +#include <Paradox/Core.h> +#include <stdio.h> + +int main(void) { + printf("PXObject test\n"); + + PXObject *object = [PXObject allocDebug]; + + if (object == nil) { + fprintf(stderr, "PXObject failed to alloc :c\n"); + return 1; + } + + object = [object init]; + + if (object == nil) { + fprintf(stderr, "PXObject failed to init :c\n"); + return 1; + } + + [object dealloc]; + + printf("If you got this far without segfaulting or crashing it means it allocated and initialized a PXObject, then deallocated it. Yayayayayay\n"); + + return 0; +} |
