Fix inplace predict missing value. (#6787)

This commit is contained in:
Jiaming Yuan
2021-03-27 05:36:10 +08:00
committed by GitHub
parent 5c87c2bba8
commit a59c7323b4
8 changed files with 97 additions and 33 deletions

View File

@@ -374,6 +374,11 @@ TEST(Json, AssigningNumber) {
value = 15; // NOLINT
ASSERT_EQ(get<Number>(json), 4);
}
{
Json value {Number(std::numeric_limits<float>::quiet_NaN())};
ASSERT_TRUE(IsA<Number>(value));
}
}
TEST(Json, AssigningString) {