Skip to content

Commit

Permalink
Fix test failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Apr 19, 2021
1 parent b3d7dfa commit 3df9f5e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CesiumGltf/test/TestJsonValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

using namespace CesiumUtility;

TEST_CASE("JsonValue rejects NaN / inf floating point values") {
REQUIRE_THROWS(JsonValue(std::numeric_limits<float>::quiet_NaN()));
REQUIRE_THROWS(JsonValue(std::numeric_limits<double>::quiet_NaN()));
REQUIRE_THROWS(JsonValue(std::numeric_limits<float>::infinity()));
REQUIRE_THROWS(JsonValue(std::numeric_limits<double>::infinity()));
REQUIRE_THROWS(JsonValue(-std::numeric_limits<float>::infinity()));
REQUIRE_THROWS(JsonValue(-std::numeric_limits<double>::infinity()));
TEST_CASE("JsonValue turns NaN / inf floating point values into null") {
CHECK(JsonValue(std::numeric_limits<float>::quiet_NaN()).isNull());
CHECK(JsonValue(std::numeric_limits<double>::quiet_NaN()).isNull());
CHECK(JsonValue(std::numeric_limits<float>::infinity()).isNull());
CHECK(JsonValue(std::numeric_limits<double>::infinity()).isNull());
CHECK(JsonValue(-std::numeric_limits<float>::infinity()).isNull());
CHECK(JsonValue(-std::numeric_limits<double>::infinity()).isNull());
}

TEST_CASE(
Expand Down

0 comments on commit 3df9f5e

Please sign in to comment.