cfs/lib/tbb/src/test/test_concurrent_unordered_map.cpp
// Add the similar test for concurrent_unordered_set.
Add the similar test for concurrent_unordered_set.
Add the similar test for concurrent_unordered_set .
void TestRangeBasedFor() {
    using namespace range_based_for_support_tests;
    REMARK( "testing range based for loop compatibility \n" );
    typedef tbb::concurrent_unordered_map<int, int> cu_map;
    cu_map a_cu_map;
    const int sequence_length = 100;
    for ( int i = 1; i <= sequence_length; ++i ) {
        a_cu_map.insert( cu_map::value_type( i, i ) );
    }
    ASSERT( range_based_for_accumulate( a_cu_map, pair_second_summer(), 0 ) == gauss_summ_of_int_sequence( sequence_length ), "incorrect accumulated value generated via range based for ?" );
}
void TestRangeBasedFor ( ) { using namespace range_based_for_support_tests ; REMARK ( " \n " ) ; typedef tbb :: concurrent_unordered_map < int , int > cu_map ; cu_map a_cu_map ; const int sequence_length = 100 ; for ( int i = 1 ; i <= sequence_length ; ++ i ) { a_cu_map . insert ( cu_map :: value_type ( i , i ) ) ; } ASSERT ( range_based_for_accumulate ( a_cu_map , pair_second_summer ( ) , 0 ) == gauss_summ_of_int_sequence ( sequence_length ) , " " ) ; }
Add the similar test for concurrent_unordered_set.
Add the similar test for concurrent_unordered_set .