aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/vector_swaps_ut.cpp
blob: d30544092d5a3173f3a7da27c97c7e417b1d4d8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <library/cpp/testing/unittest/registar.h>
 
#include "vector_swaps.h" 
 
Y_UNIT_TEST_SUITE(TVectorSwapsTest) {
    Y_UNIT_TEST(Simple) {
        TVectorSwaps<THolder<unsigned>> v;
        for (unsigned i = 0; i < 100; ++i) { 
            THolder<unsigned> tmp(new unsigned(i)); 
            v.push_back(tmp); 
        } 
 
        for (unsigned i = 0; i < 100; ++i) { 
            UNIT_ASSERT_VALUES_EQUAL(i, *v[i]); 
        } 
    } 
}