Fixed JsonVariant::is<int>() that returned true for empty strings

This commit is contained in:
Benoit Blanchon committed 2018-07-05 09:53:11 +02:00
1 parent 954428e341
commit fa1a40ac6e
3 files changed
+8 -3

No files matched your search

+4
View File
@@ -12,6 +12,10 @@ TEST_CASE("isInteger()") {
REQUIRE_FALSE(isInteger(NULL));
}
SECTION("Empty String") {
REQUIRE_FALSE(isInteger(""));
}
SECTION("FloatNotInteger") {
REQUIRE_FALSE(isInteger("3.14"));
REQUIRE_FALSE(isInteger("-3.14"));