| 957 | } |
| 958 | |
| 959 | void PostDecTestUint64() |
| 960 | { |
| 961 | size_t i; |
| 962 | |
| 963 | for( i = 0; i < COUNTOF(dec_uint64); ++i ) |
| 964 | { |
| 965 | bool fSuccess = true; |
| 966 | try |
| 967 | { |
| 968 | SafeInt<unsigned __int64> si(dec_uint64[i].x); |
| 969 | SafeInt<unsigned __int64> vv = si--; |
| 970 | |
| 971 | if(vv != dec_uint64[i].x) |
| 972 | { |
| 973 | fSuccess = false; |
| 974 | } |
| 975 | } |
| 976 | catch(SafeIntException&) |
| 977 | { |
| 978 | fSuccess = false; |
| 979 | } |
| 980 | |
| 981 | if( fSuccess != dec_uint64[i].fExpected ) |
| 982 | { |
| 983 | cerr << "Error in case dec_uint64 throw (2): "; |
| 984 | cerr << HEX(16) << dec_uint64[i].x << ", "; |
| 985 | cerr << "expected = " << dec_uint64[i].fExpected << endl; |
| 986 | } |
| 987 | } |
| 988 | } |
| 989 | |
| 990 | static const DecTest< __int8 > dec_int8[] = |
| 991 | { |