int main( int argc, char* argv[] ) { // Set default for minimum number of threads. MinThread = 1; ParseCommandLine(argc,argv); TestEmptyQueue<char>(); TestEmptyQueue<Foo>(); TestFullQueue(); TestConcurrenetQueueType(); TestIterator(); // Test concurrent operations for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) { TestNegativeQueue<Foo>(nthread); for( int prefill=0; prefill<64; prefill+=(1+prefill/3) ) { TestPushPop(prefill,ptrdiff_t(-1),nthread); TestPushPop(prefill,ptrdiff_t(1),nthread); TestPushPop(prefill,ptrdiff_t(2),nthread); TestPushPop(prefill,ptrdiff_t(10),nthread); TestPushPop(prefill,ptrdiff_t(100),nthread); } } printf("done\n"); return 0; }
int TestMain () { TestEmptyQueue<char>(); TestEmptyQueue<Foo>(); TestFullQueue(); TestConcurrentQueueType(); TestIterator(); // Test concurrent operations for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) { TestNegativeQueue<Foo>(nthread); for( int prefill=0; prefill<64; prefill+=(1+prefill/3) ) { TestPushPop(prefill,ptrdiff_t(-1),nthread); TestPushPop(prefill,ptrdiff_t(1),nthread); TestPushPop(prefill,ptrdiff_t(2),nthread); TestPushPop(prefill,ptrdiff_t(10),nthread); TestPushPop(prefill,ptrdiff_t(100),nthread); } } return Harness::Done; }