mirror of
https://github.com/TartanLlama/optional.git
synced 2025-06-25 00:51:37 +02:00
✨ Add basic .deb generation support WiX and RPM support is still needed for verification ⬆️ Upgrade minimum CMake version to 3.14 ⬆️ Upgrade Catch to Catch v2.9.2 📌 Pin Catch to v2.9.1 👷 Update .travis.yml build matrix 👷 Update .appveyor build script ✅ Update tests to be separated by file
17 lines
377 B
C++
17 lines
377 B
C++
#include <catch2/catch.hpp>
|
|
#include <tl/optional.hpp>
|
|
|
|
TEST_CASE("Nullopt", "[nullopt]") {
|
|
tl::optional<int> o1 = tl::nullopt;
|
|
tl::optional<int> o2{tl::nullopt};
|
|
tl::optional<int> o3(tl::nullopt);
|
|
tl::optional<int> o4 = {tl::nullopt};
|
|
|
|
REQUIRE(!o1);
|
|
REQUIRE(!o2);
|
|
REQUIRE(!o3);
|
|
REQUIRE(!o4);
|
|
|
|
REQUIRE(!std::is_default_constructible<tl::nullopt_t>::value);
|
|
}
|