Fix VS 2015 build of unit-bon8: compare tellg() outside doctest decomposition (#6128)
VS 2015 cannot find an operator== for doctest's Expression_lhs<std::fpos> and int, introduced in #6119. Evaluate the comparison as a plain bool. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 parent
81888ff9f0
commit
79f6513cec
1 file changed
+1
-1
@@ -622,7 +622,7 @@ TEST_CASE("BON8")
|
|||||||
// with a terminated string, strict = false leaves the next value in the stream
|
// with a terminated string, strict = false leaves the next value in the stream
|
||||||
std::istringstream terminated(std::string("\x61\xFF\x90", 3));
|
std::istringstream terminated(std::string("\x61\xFF\x90", 3));
|
||||||
CHECK(json::from_bon8(terminated, false) == "a");
|
CHECK(json::from_bon8(terminated, false) == "a");
|
||||||
CHECK(terminated.tellg() == 2);
|
CHECK((terminated.tellg() == 2));
|
||||||
CHECK(json::from_bon8(terminated, false) == 0);
|
CHECK(json::from_bon8(terminated, false) == 0);
|
||||||
|
|
||||||
// without the terminator, the next value would be lost
|
// without the terminator, the next value would be lost
|
||||||
|
|||||||
Reference in new issue
Block a user