int main(int argc, char * argv[]) { LOGD("Test started"); LOGD("Testing reads"); TestRead(); LOGD("Testing writes"); TestWrite(); LOGD("Testing wraps"); TestWrap(); LOG("ByteBuffer test finished."); }
VOID TestCircularBufferCode( PVMDIR_TEST_STATE pState ) { printf("Testing circular buffer code ..."); TestSingleElement(pState); TestWrap(pState); TestZeroSizedBufferShouldFail(pState); TestOverflowSizedBufferShouldFail(pState); TestMakeCapacityBiggerShouldSucceed(pState); TestMakeCapacitySmallerShouldSucceed(pState); TestSelectReturnsCorrectElementsInCorrectOrder(pState); TestSelectReturnsWhenCallbackReturnsFalse(pState); TestSelectTooManyElementsQuietlySucceeds(pState); TestCleanupOfValidCircularBuffer(pState); TestCleanupOfNullCircularBuffer(pState); printf(" PASSED\n"); }