| 1182 | } |
| 1183 | |
| 1184 | void PostDecTestInt32() |
| 1185 | { |
| 1186 | size_t i; |
| 1187 | |
| 1188 | for( i = 0; i < COUNTOF(dec_int32); ++i ) |
| 1189 | { |
| 1190 | bool fSuccess = true; |
| 1191 | try |
| 1192 | { |
| 1193 | SafeInt< __int32 > si(dec_int32[i].x); |
| 1194 | SafeInt< __int32 > vv = si--; |
| 1195 | |
| 1196 | if(vv != dec_int32[i].x) |
| 1197 | { |
| 1198 | fSuccess = false; |
| 1199 | } |
| 1200 | } |
| 1201 | catch(SafeIntException&) |
| 1202 | { |
| 1203 | fSuccess = false; |
| 1204 | } |
| 1205 | |
| 1206 | if( fSuccess != dec_int32[i].fExpected ) |
| 1207 | { |
| 1208 | cerr << "Error in case dec_int32 throw (2): "; |
| 1209 | cerr << HEX(8) << dec_int32[i].x << ", "; |
| 1210 | cerr << "expected = " << dec_int32[i].fExpected << endl; |
| 1211 | } |
| 1212 | } |
| 1213 | } |
| 1214 | |
| 1215 | static const DecTest< __int64 > dec_int64[] = |
| 1216 | { |