| 1259 | bool Value::isBool() const { return type() == booleanValue; } |
| 1260 | |
| 1261 | bool Value::isInt() const { |
| 1262 | switch (type()) { |
| 1263 | case intValue: |
| 1264 | #if defined(JSON_HAS_INT64) |
| 1265 | return value_.int_ >= minInt && value_.int_ <= maxInt; |
| 1266 | #else |
| 1267 | return true; |
| 1268 | #endif |
| 1269 | case uintValue: |
| 1270 | return value_.uint_ <= UInt(maxInt); |
| 1271 | case realValue: |
| 1272 | return value_.real_ >= minInt && value_.real_ <= maxInt && |
| 1273 | IsIntegral(value_.real_); |
| 1274 | default: |
| 1275 | break; |
| 1276 | } |
| 1277 | return false; |
| 1278 | } |
| 1279 | |
| 1280 | bool Value::isUInt() const { |
| 1281 | switch (type()) { |
no test coverage detected