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

Function PostDecTestUint64

Archive/releases/2/IncDecVerify.cpp:959–988  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

957}
958
959void 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
990static const DecTest< __int8 > dec_int8[] =
991{

Callers 1

IncDecVerifyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected