| 269 | }; |
| 270 | |
| 271 | void PreIncTestUint64() |
| 272 | { |
| 273 | size_t i; |
| 274 | |
| 275 | for( i = 0; i < COUNTOF(inc_uint64); ++i ) |
| 276 | { |
| 277 | bool fSuccess = true; |
| 278 | try |
| 279 | { |
| 280 | SafeInt<std::uint64_t> si(inc_uint64[i].x); |
| 281 | SafeInt<std::uint64_t> vv = ++si; |
| 282 | |
| 283 | if(vv != inc_uint64[i].y) |
| 284 | { |
| 285 | fSuccess = false; |
| 286 | } |
| 287 | } |
| 288 | catch(SafeIntException&) |
| 289 | { |
| 290 | fSuccess = false; |
| 291 | } |
| 292 | |
| 293 | if( fSuccess != inc_uint64[i].fExpected ) |
| 294 | { |
| 295 | cerr << "Error in case inc_uint64 throw (1): "; |
| 296 | cerr << HEX(16) << inc_uint64[i].x << ", "; |
| 297 | cerr << "expected = " << inc_uint64[i].fExpected << endl; |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | void PostIncTestUint64() |
| 303 | { |