blob: 0a879832194e89f81ee3795665ee0f7d9d8325f5 [file] [log] [blame]
Brian Silvermanda861352019-02-02 16:42:28 -08001#include "catch.hpp"
2#include "optional.hpp"
3#include <utility>
4#include <tuple>
5
6TEST_CASE("Emplace", "[emplace]") {
7 tl::optional<std::pair<std::pair<int,int>, std::pair<double, double>>> i;
8 i.emplace(std::piecewise_construct, std::make_tuple(0,2), std::make_tuple(3,4));
9 REQUIRE(i->first.first == 0);
10 REQUIRE(i->first.second == 2);
11 REQUIRE(i->second.first == 3);
12 REQUIRE(i->second.second == 4);
13}