| 1193 | }; |
| 1194 | |
| 1195 | void PreDecTestInt64() |
| 1196 | { |
| 1197 | size_t i; |
| 1198 | |
| 1199 | for( i = 0; i < COUNTOF(dec_int64); ++i ) |
| 1200 | { |
| 1201 | bool fSuccess = true; |
| 1202 | try |
| 1203 | { |
| 1204 | SafeInt< std::int64_t > si(dec_int64[i].x); |
| 1205 | SafeInt< std::int64_t > vv = --si; |
| 1206 | |
| 1207 | if(vv != dec_int64[i].y) |
| 1208 | { |
| 1209 | fSuccess = false; |
| 1210 | } |
| 1211 | } |
| 1212 | catch(SafeIntException&) |
| 1213 | { |
| 1214 | fSuccess = false; |
| 1215 | } |
| 1216 | |
| 1217 | if( fSuccess != dec_int64[i].fExpected ) |
| 1218 | { |
| 1219 | cerr << "Error in case dec_int64 throw (1): "; |
| 1220 | cerr << HEX(16) << dec_int64[i].x << ", "; |
| 1221 | cerr << "expected = " << dec_int64[i].fExpected << endl; |
| 1222 | } |
| 1223 | } |
| 1224 | } |
| 1225 | |
| 1226 | void PostDecTestInt64() |
| 1227 | { |