aboutsummaryrefslogtreecommitdiff
path: root/tests/Object.m
blob: be81b1df74dd0c9eb37753a001f2fc59032f3058 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;
}