Files
optional/tests/emplace.cpp
Isabella Muerte 54f7f970bf 🎨 Cleanup include path for catch2
 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
2019-09-17 09:59:36 -07:00

14 lines
437 B
C++

#include <catch2/catch.hpp>
#include <tl/optional.hpp>
#include <utility>
#include <tuple>
TEST_CASE("Emplace", "[emplace]") {
tl::optional<std::pair<std::pair<int,int>, std::pair<double, double>>> i;
i.emplace(std::piecewise_construct, std::make_tuple(0,2), std::make_tuple(3,4));
REQUIRE(i->first.first == 0);
REQUIRE(i->first.second == 2);
REQUIRE(i->second.first == 3);
REQUIRE(i->second.second == 4);
}