MCPcopy Create free account
hub / github.com/dcleblanc/SafeInt / PostDecTestInt64

Function PostDecTestInt64

Archive/releases/2/IncDecVerify.cpp:1267–1296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1265}
1266
1267void PostDecTestInt64()
1268{
1269 size_t i;
1270
1271 for( i = 0; i < COUNTOF(dec_int64); ++i )
1272 {
1273 bool fSuccess = true;
1274 try
1275 {
1276 SafeInt< __int64 > si(dec_int64[i].x);
1277 SafeInt< __int64 > vv = si--;
1278
1279 if(vv != dec_int64[i].x)
1280 {
1281 fSuccess = false;
1282 }
1283 }
1284 catch(SafeIntException&)
1285 {
1286 fSuccess = false;
1287 }
1288
1289 if( fSuccess != dec_int64[i].fExpected )
1290 {
1291 cerr << "Error in case dec_int64 throw (2): ";
1292 cerr << HEX(16) << dec_int64[i].x << ", ";
1293 cerr << "expected = " << dec_int64[i].fExpected << endl;
1294 }
1295 }
1296}
1297
1298void IncDecVerify()
1299{

Callers 1

IncDecVerifyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected