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

Function PostDecTestInt64

Test/IncDecVerify.cpp:1226–1255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1224}
1225
1226void PostDecTestInt64()
1227{
1228 size_t i;
1229
1230 for( i = 0; i < COUNTOF(dec_int64); ++i )
1231 {
1232 bool fSuccess = true;
1233 try
1234 {
1235 SafeInt< std::int64_t > si(dec_int64[i].x);
1236 SafeInt< std::int64_t > vv = si--;
1237
1238 if(vv != dec_int64[i].x)
1239 {
1240 fSuccess = false;
1241 }
1242 }
1243 catch(SafeIntException&)
1244 {
1245 fSuccess = false;
1246 }
1247
1248 if( fSuccess != dec_int64[i].fExpected )
1249 {
1250 cerr << "Error in case dec_int64 throw (2): ";
1251 cerr << HEX(16) << dec_int64[i].x << ", ";
1252 cerr << "expected = " << dec_int64[i].fExpected << endl;
1253 }
1254 }
1255}
1256
1257void IncDecVerify()
1258{

Callers 1

IncDecVerifyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected