| 1 | |
| 2 | #include "CppUTest/TestHarness.h" |
| 3 | |
| 4 | #if CPPUTEST_USE_STD_CPP_LIB |
| 5 | |
| 6 | #include <memory> |
| 7 | |
| 8 | TEST_GROUP(StandardCppLibrary) |
| 9 | { |
| 10 | }; |
| 11 | |
| 12 | #if defined(__cplusplus) && __cplusplus >= 201402L |
| 13 | |
| 14 | TEST(StandardCppLibrary, UniquePtrConversationToBool) |
| 15 | { |
| 16 | auto const aNull = std::unique_ptr<int>(nullptr); |
| 17 | CHECK_FALSE(aNull); |
| 18 | |
| 19 | auto const notNull = std::make_unique<int>(1); |
| 20 | CHECK_TRUE(notNull); |
| 21 | } |
| 22 | |
| 23 | #endif |
| 24 | |
| 25 | #endif |
| 26 |