⚗️ try to fix compilation issue
This commit is contained in:
parent
86c28f4e44
commit
bc46595053
@ -276,6 +276,17 @@ TEST_CASE("constructors")
|
|||||||
{
|
{
|
||||||
json const j{1, 2.0, "string", 42};
|
json const j{1, 2.0, "string", 42};
|
||||||
|
|
||||||
|
const auto t = j.get<std::tuple<int, float, std::string>>();
|
||||||
|
CHECK(std::get<0>(t) == j[0]);
|
||||||
|
CHECK(std::get<1>(t) == j[1]);
|
||||||
|
const bool res = (std::get<2>(t) == j[2]);
|
||||||
|
CHECK(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("std::tuple with discarded values")
|
||||||
|
{
|
||||||
|
json const j{1, 2.0, std::string{"string"}, 42};
|
||||||
|
|
||||||
const auto t = j.get<std::tuple<int, float, std::string>>();
|
const auto t = j.get<std::tuple<int, float, std::string>>();
|
||||||
CHECK(std::get<0>(t) == j[0]);
|
CHECK(std::get<0>(t) == j[0]);
|
||||||
CHECK(std::get<1>(t) == j[1]);
|
CHECK(std::get<1>(t) == j[1]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user