diff options
author | Luca Muscariello <lumuscar+fdio@cisco.com> | 2019-01-24 16:32:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-01-24 16:32:25 +0000 |
commit | 9fc2b9ec49c54ec2d5f0164bbedc1c78732c464c (patch) | |
tree | c7ebcf4c83b5c2f71318bc69c6f6915aaac7ae2a /libparc/parc/concurrent/test/test_parc_Thread.c | |
parent | cada1143501a48effc483e3873596c22849926b5 (diff) | |
parent | 097e69e6daeefc84fd271babbdc1b47dfe4c01e5 (diff) |
Merge "Add support for ubuntu18.04 packages."
Diffstat (limited to 'libparc/parc/concurrent/test/test_parc_Thread.c')
-rw-r--r-- | libparc/parc/concurrent/test/test_parc_Thread.c | 15 |
1 files changed, 15 insertions, 0 deletions
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; |