LONGBOW_TEST_CASE(Object, parcStopwatch_HashCode) { PARCStopwatch *x = parcStopwatch_Create(); PARCStopwatch *y = parcStopwatch_Create(); parcObjectTesting_AssertHashCode(x, y); parcStopwatch_Release(&x); parcStopwatch_Release(&y); }
LONGBOW_TEST_CASE(Global, parcSortedList_HashCode) { PARCSortedList *x = parcSortedList_Create(); PARCSortedList *y = parcSortedList_Create(); parcObjectTesting_AssertHashCode(x, y); parcSortedList_Release(&x); parcSortedList_Release(&y); }
LONGBOW_TEST_CASE(Object, parcFutureTask_HashCode) { PARCFutureTask *x = parcFutureTask_Create(_function, _function); PARCFutureTask *y = parcFutureTask_Create(_function, _function); parcObjectTesting_AssertHashCode(x, y); parcFutureTask_Release(&x); parcFutureTask_Release(&y); }
LONGBOW_TEST_CASE(Object, parcThreadPool_HashCode) { PARCThreadPool *x = parcThreadPool_Create(6); PARCThreadPool *y = parcThreadPool_Create(6); parcObjectTesting_AssertHashCode(x, y); parcThreadPool_ShutdownNow(x); parcThreadPool_ShutdownNow(y); parcThreadPool_Release(&x); parcThreadPool_Release(&y); }
void parcObjectTesting_AssertObjectConformance(const PARCObject *inst1, const PARCObject *inst2, const PARCObject *inst3, const PARCObject *lesser, const PARCObject *greater) { assertNotNull(inst1, "The value of x cannot be NULL."); assertNotNull(inst2, "The value of y cannot be NULL."); assertNotNull(inst3, "The value of z cannot be NULL."); assertNotNull(lesser, "The value of z cannot be NULL."); assertNotNull(greater, "The value of z cannot be NULL."); parcObject_AssertValid(inst1); parcObject_AssertValid(inst2); parcObject_AssertValid(inst3); parcObject_AssertValid(lesser); parcObject_AssertValid(greater); // Acquire/Release parcObjectTesting_AssertAcquireReleaseImpl(inst1); // Equals _parcObjectTesting_AssertEqualsWrapper(inst1, inst2, inst3, lesser, greater, NULL); // Copy _parcObjectTesting_AssertCopy(inst1); // Compare const void *equals[] = { inst1, inst2, NULL }; const void *lessThan[] = { lesser, NULL }; const void *greaterThan[] = { greater, NULL }; parcObjectTesting_AssertCompareToImpl(parcObject_Compare, inst1, equals, lessThan, greaterThan); // HashCode parcObjectTesting_AssertHashCode(inst1, inst2); // ToJSON _parcObjectTesting_AssertToJSON(inst1); // ToString _parcObjectTesting_AssertToString(inst1); }