aboutsummaryrefslogtreecommitdiffstats
path: root/libparc/parc/concurrent/test
diff options
context:
space:
mode:
Diffstat (limited to 'libparc/parc/concurrent/test')
-rw-r--r--libparc/parc/concurrent/test/test_parc_ScheduledThreadPool.c4
-rw-r--r--libparc/parc/concurrent/test/test_parc_Thread.c15
-rw-r--r--libparc/parc/concurrent/test/test_parc_ThreadPool.c2
3 files changed, 18 insertions, 3 deletions
diff --git a/libparc/parc/concurrent/test/test_parc_ScheduledThreadPool.c b/libparc/parc/concurrent/test/test_parc_ScheduledThreadPool.c
index f466d72a..e2e2473c 100644
--- a/libparc/parc/concurrent/test/test_parc_ScheduledThreadPool.c
+++ b/libparc/parc/concurrent/test/test_parc_ScheduledThreadPool.c
@@ -80,7 +80,7 @@ LONGBOW_TEST_CASE(CreateAcquireRelease, CreateRelease)
parcObjectTesting_AssertAcquireReleaseContract(parcScheduledThreadPool_Acquire, instance);
parcScheduledThreadPool_ShutdownNow(instance);
- assertTrue(parcObject_GetReferenceCount(instance) == 1, "Expected 1 reference count. Actual %llu", parcObject_GetReferenceCount(instance));
+ assertTrue(parcObject_GetReferenceCount(instance) == 1, "Expected 1 reference count. Actual %lu", parcObject_GetReferenceCount(instance));
parcScheduledThreadPool_Release(&instance);
assertNull(instance, "Expected null result from parcScheduledThreadPool_Release();");
@@ -260,7 +260,7 @@ LONGBOW_TEST_CASE(Specialization, OneJob)
PARCFutureTask *task = parcFutureTask_Create(_function, _function);
parcScheduledThreadPool_Schedule(pool, task, parcTimeout_MilliSeconds(2000));
- printf("references %lld\n", parcObject_GetReferenceCount(task));
+ printf("references %lu\n", parcObject_GetReferenceCount(task));
parcFutureTask_Release(&task);
sleep(5);
diff --git a/libparc/parc/concurrent/test/test_parc_Thread.c b/libparc/parc/concurrent/test/test_parc_Thread.c
index 22ca31bf..679f58d0 100644
--- a/libparc/parc/concurrent/test/test_parc_Thread.c
+++ b/libparc/parc/concurrent/test/test_parc_Thread.c
@@ -72,7 +72,12 @@ LONGBOW_TEST_FIXTURE_TEARDOWN(CreateAcquireRelease)
PARCBuffer *buffer = longBowTestCase_Get(testCase, "object");
parcBuffer_Release(&buffer);
+#if INTPTR_MAX == INT32_MAX
uint32_t initialAllocations = (uint32_t) longBowTestCase_Get(testCase, "initialAllocations");
+#else
+ uint64_t initialAllocations = (uint64_t) longBowTestCase_Get(testCase, "initialAllocations");
+#endif
+
if (!parcMemoryTesting_ExpectedOutstanding(initialAllocations, "%s leaked memory.", longBowTestCase_GetFullName(testCase))) {
parcSafeMemory_ReportAllocation(1);
return LONGBOW_STATUS_MEMORYLEAK;
@@ -126,7 +131,12 @@ LONGBOW_TEST_FIXTURE_TEARDOWN(Object)
PARCBuffer *buffer = longBowTestCase_Get(testCase, "object");
parcBuffer_Release(&buffer);
+#if INTPTR_MAX == INT32_MAX
uint32_t initialAllocations = (uint32_t) longBowTestCase_Get(testCase, "initialAllocations");
+#else
+ uint64_t initialAllocations = (uint64_t) longBowTestCase_Get(testCase, "initialAllocations");
+#endif
+
if (!parcMemoryTesting_ExpectedOutstanding(initialAllocations, "%s leaked memory.", longBowTestCase_GetFullName(testCase))) {
parcSafeMemory_ReportAllocation(1);
return LONGBOW_STATUS_MEMORYLEAK;
@@ -239,7 +249,12 @@ LONGBOW_TEST_FIXTURE_SETUP(Specialization)
LONGBOW_TEST_FIXTURE_TEARDOWN(Specialization)
{
+#if INTPTR_MAX == INT32_MAX
uint32_t initialAllocations = (uint32_t) longBowTestCase_Get(testCase, "initialAllocations");
+#else
+ uint64_t initialAllocations = (uint64_t) longBowTestCase_Get(testCase, "initialAllocations");
+#endif
+
if (!parcMemoryTesting_ExpectedOutstanding(initialAllocations, "%s leaked memory.", longBowTestCase_GetFullName(testCase))) {
parcSafeMemory_ReportAllocation(1);
return LONGBOW_STATUS_MEMORYLEAK;
diff --git a/libparc/parc/concurrent/test/test_parc_ThreadPool.c b/libparc/parc/concurrent/test/test_parc_ThreadPool.c
index 6ed6e4d3..5ec60fa5 100644
--- a/libparc/parc/concurrent/test/test_parc_ThreadPool.c
+++ b/libparc/parc/concurrent/test/test_parc_ThreadPool.c
@@ -255,7 +255,7 @@ LONGBOW_TEST_CASE(Object, parcThreadPool_Execute)
assertTrue(shutdownSuccess, "parcThreadPool_AwaitTermination timed-out");
uint64_t count = parcThreadPool_GetCompletedTaskCount(pool);
- assertTrue(count == 5, "Expected 5, actual %lld", count);
+ assertTrue(count == 5, "Expected 5, actual %lu", count);
parcThreadPool_Release(&pool);