| 300 | } |
| 301 | |
| 302 | void PostIncTestUint64() |
| 303 | { |
| 304 | size_t i; |
| 305 | |
| 306 | for( i = 0; i < COUNTOF(inc_uint64); ++i ) |
| 307 | { |
| 308 | bool fSuccess = true; |
| 309 | try |
| 310 | { |
| 311 | SafeInt<std::uint64_t> si(inc_uint64[i].x); |
| 312 | SafeInt<std::uint64_t> vv = si++; |
| 313 | |
| 314 | if(vv != inc_uint64[i].x) |
| 315 | { |
| 316 | fSuccess = false; |
| 317 | } |
| 318 | } |
| 319 | catch(SafeIntException&) |
| 320 | { |
| 321 | fSuccess = false; |
| 322 | } |
| 323 | |
| 324 | if( fSuccess != inc_uint64[i].fExpected ) |
| 325 | { |
| 326 | cerr << "Error in case inc_uint64 throw (2): "; |
| 327 | cerr << HEX(16) << inc_uint64[i].x << ", "; |
| 328 | cerr << "expected = " << inc_uint64[i].fExpected << endl; |
| 329 | } |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | static const IncTest< std::int8_t > inc_int8[] = |
| 334 | { |