diff options
| author | Arslaan Pathan <[email protected]> | 2026-10-02 22:40:41 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-10-02 22:40:41 +1300 |
| commit | fd722c39cbb725ad863ceb9aceb2c6278a8e5273 (patch) | |
| tree | 4f18952627098c46dcd5d868d522e54a1b814c36 /tests | |
| parent | 4c892d337bd43b78fd89dd606341856223ad93d7 (diff) | |
| download | Paradox-fd722c39cbb725ad863ceb9aceb2c6278a8e5273.tar.xz Paradox-fd722c39cbb725ad863ceb9aceb2c6278a8e5273.zip | |
Tests work regardless of debug or not
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/AutoreleasePool.m | 6 | ||||
| -rw-r--r-- | tests/Object.m | 13 |
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/AutoreleasePool.m b/tests/AutoreleasePool.m index f0b3599..fe258f5 100644 --- a/tests/AutoreleasePool.m +++ b/tests/AutoreleasePool.m @@ -7,8 +7,14 @@ int main(void) { @autoreleasepool { PXObject *object = [PXObject new]; printf("created object in autorelease pool\n"); +#ifdef PARADOX_DEBUG_FEATURES printf("attempting healthCheck\n"); [object healthCheck]; +#else + printf("Paradox compiled without debug features, skipping healthCheck\n"); + /* suppress unused variable warning */ + (void)object; +#endif } printf("autorelease pool end\n"); printf("test complete\n"); diff --git a/tests/Object.m b/tests/Object.m index df955cf..8c467cb 100644 --- a/tests/Object.m +++ b/tests/Object.m @@ -2,9 +2,18 @@ #include <stdio.h> int main(void) { - printf("PXObject test (alloc)\n"); - + printf("PXObject test "); +#ifdef PARADOX_DEBUG_FEATURES + printf("(allocDebug)\n"); +#else + printf("(alloc)\n"); +#endif + +#ifdef PARADOX_DEBUG_FEATURES + PXObject *object = [PXObject allocDebug]; +#else PXObject *object = [PXObject alloc]; +#endif if (object == nil) { fprintf(stderr, "PXObject failed to alloc :c\n"); |
