Commit 82fbbeea authored by Guillaume Racicot's avatar Guillaume Racicot

Adapted unit tests to use ADL calls for swap like the new swappable concept

parent 225c8f15
...@@ -154,7 +154,7 @@ TEST_CASE("concepts") ...@@ -154,7 +154,7 @@ TEST_CASE("concepts")
json j {1, 2, 3}; json j {1, 2, 3};
json::iterator it1 = j.begin(); json::iterator it1 = j.begin();
json::iterator it2 = j.end(); json::iterator it2 = j.end();
std::swap(it1, it2); swap(it1, it2);
CHECK(it1 == j.end()); CHECK(it1 == j.end());
CHECK(it2 == j.begin()); CHECK(it2 == j.begin());
} }
...@@ -162,7 +162,7 @@ TEST_CASE("concepts") ...@@ -162,7 +162,7 @@ TEST_CASE("concepts")
json j {1, 2, 3}; json j {1, 2, 3};
json::const_iterator it1 = j.cbegin(); json::const_iterator it1 = j.cbegin();
json::const_iterator it2 = j.cend(); json::const_iterator it2 = j.cend();
std::swap(it1, it2); swap(it1, it2);
CHECK(it1 == j.end()); CHECK(it1 == j.end());
CHECK(it2 == j.begin()); CHECK(it2 == j.begin());
} }
......
...@@ -878,7 +878,8 @@ TEST_CASE("modifiers") ...@@ -878,7 +878,8 @@ TEST_CASE("modifiers")
json j("hello world"); json j("hello world");
json k(42.23); json k(42.23);
std::swap(j, k); using std::swap;
swap(j, k);
CHECK(j == json(42.23)); CHECK(j == json(42.23));
CHECK(k == json("hello world")); CHECK(k == json("hello world"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment