int TestMain () { if( MinThread<0 ) { REPORT("ERROR: must use at least one thread\n"); exit(1); } if( MaxThread<2 ) MaxThread=2; // Do serial tests TestTypes(); TestCopy(); TestRehash(); TestAssignment(); TestIteratorsAndRanges(); #if TBB_USE_EXCEPTIONS TestExceptions(); #endif /* TBB_USE_EXCEPTIONS */ // Do concurrency tests. for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) { tbb::task_scheduler_init init( nthread ); TestInsertFindErase( nthread ); TestConcurrency( nthread ); } // check linking if(bad_hashing) { //should be false tbb::internal::runtime_warning("none\nERROR: it must not be executed"); } return Harness::Done; }
int TestMain () { if( MinThread<1 ) { REPORT("ERROR: MinThread=%d, but must be at least 1\n",MinThread); MinThread = 1; } #if !TBB_DEPRECATED TestIteratorTraits<tbb::concurrent_vector<Foo>::iterator,Foo>(); TestIteratorTraits<tbb::concurrent_vector<Foo>::const_iterator,const Foo>(); TestSequentialFor<FooWithAssign> (); TestResizeAndCopy(); TestAssign(); #if HAVE_m128 TestSSE(); #endif /* HAVE_m128 */ #endif TestCapacity(); ASSERT( !FooCount, NULL ); for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) { tbb::task_scheduler_init init( nthread ); TestParallelFor( nthread ); TestConcurrentGrowToAtLeast(); TestConcurrentGrowBy( nthread ); } ASSERT( !FooCount, NULL ); #if !TBB_DEPRECATED TestComparison(); #if !__TBB_FLOATING_POINT_BROKEN TestFindPrimes(); #endif TestSort(); #if __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN REPORT("Known issue: exception safety test is skipped.\n"); #elif TBB_USE_EXCEPTIONS TestExceptions(); #endif /* TBB_USE_EXCEPTIONS */ #endif /* !TBB_DEPRECATED */ ASSERT( !FooCount, NULL ); REMARK("sizeof(concurrent_vector<int>) == %d\n", (int)sizeof(tbb::concurrent_vector<int>)); return Harness::Done; }