nondestroying_holder_ut.cpp 311 B

123456789101112
  1. #include <library/cpp/testing/unittest/registar.h>
  2. #include "nondestroying_holder.h"
  3. Y_UNIT_TEST_SUITE(TNonDestroyingHolder) {
  4. Y_UNIT_TEST(ToAutoPtr) {
  5. TNonDestroyingHolder<int> h(new int(11));
  6. TAutoPtr<int> i(h);
  7. UNIT_ASSERT_VALUES_EQUAL(11, *i);
  8. UNIT_ASSERT(!h);
  9. }
  10. }