| 199 | } |
| 200 | |
| 201 | void testUInt8Overflow() { |
| 202 | bool ok; |
| 203 | fmt::parseValue(NodeKind::UInt8, "256", &ok); |
| 204 | QVERIFY2(!ok, "256 overflows uint8"); |
| 205 | |
| 206 | fmt::parseValue(NodeKind::UInt8, "255", &ok); |
| 207 | QVERIFY(ok); |
| 208 | |
| 209 | fmt::parseValue(NodeKind::UInt8, "0", &ok); |
| 210 | QVERIFY(ok); |
| 211 | |
| 212 | // Negative should fail for unsigned |
| 213 | fmt::parseValue(NodeKind::UInt8, "-1", &ok); |
| 214 | QVERIFY2(!ok, "Negative should fail for uint8"); |
| 215 | } |
| 216 | |
| 217 | void testInt16Overflow() { |
| 218 | bool ok; |
nothing calls this directly
no test coverage detected