vector_swaps_ut.cpp 435 B

1234567891011121314151617
  1. #include <library/cpp/testing/unittest/registar.h>
  2. #include "vector_swaps.h"
  3. Y_UNIT_TEST_SUITE(TVectorSwapsTest) {
  4. Y_UNIT_TEST(Simple) {
  5. TVectorSwaps<THolder<unsigned>> v;
  6. for (unsigned i = 0; i < 100; ++i) {
  7. THolder<unsigned> tmp(new unsigned(i));
  8. v.push_back(tmp);
  9. }
  10. for (unsigned i = 0; i < 100; ++i) {
  11. UNIT_ASSERT_VALUES_EQUAL(i, *v[i]);
  12. }
  13. }
  14. }