From ce421c6d05c7855ce50d0377362096f258335d4c Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Fri, 2 Oct 2026 19:08:12 +1300 Subject: Debugging stuff and basic PXObject test --- tests/Object.m | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/Object.m (limited to 'tests/Object.m') 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 +#include + +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; +} -- cgit v1.2.3