Exemplo n.º 1
0
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.");
}
Exemplo n.º 2
0
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");
}