test_uptr.cpp 468 B

123456789101112131415161718192021
  1. #include <catch2/catch_test_macros.hpp>
  2. #include <mcl/ptrs/uptr.hpp>
  3. #pragma region constructor
  4. TEST_CASE("Constructor from cpointer", "[UPtr][smart][unique][pointer][constructor][cpointer][raw]") {
  5. mcl::ptrs::UPtr<int> uptr( new int(5) );
  6. REQUIRE( *uptr == 5 );
  7. }
  8. TEST_CASE("Forward of type constructor arguments", "[UPtr][smart][unique][pointer][constructor][args]") {
  9. mcl::ptrs::UPtr<int> ptr(10);
  10. REQUIRE( *ptr == 10 );
  11. }
  12. #pragma endregion