| 1608 | } |
| 1609 | |
| 1610 | void DivVerifyInt64Int64_2() |
| 1611 | { |
| 1612 | size_t i; |
| 1613 | |
| 1614 | for( i = 0; i < sizeof(int64_int64)/sizeof(int64_int64[0]); ++i ) |
| 1615 | { |
| 1616 | // Now test throwing version |
| 1617 | bool fSuccess = true; |
| 1618 | try |
| 1619 | { |
| 1620 | SafeInt<std::int64_t> si(int64_int64[i].y); |
| 1621 | SafeInt<std::int64_t> si2; |
| 1622 | |
| 1623 | si2 = int64_int64[i].x / si; |
| 1624 | } |
| 1625 | catch(...) |
| 1626 | { |
| 1627 | fSuccess = false; |
| 1628 | } |
| 1629 | |
| 1630 | if( fSuccess != int64_int64[i].fExpected ) |
| 1631 | { |
| 1632 | printf("Error in case int64_int64 throw: %X, %I64X, expected = %s\n", int64_int64[i].x, int64_int64[i].y, int64_int64[i].fExpected ? "true" : "false"); |
| 1633 | } |
| 1634 | } |
| 1635 | } |
| 1636 | |
| 1637 | DivTest< std::int64_t, std::int32_t > int64_int32[] = |
| 1638 | { |