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

Function PreIncTestInt64

Test/IncDecVerify.cpp:579–608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577};
578
579void PreIncTestInt64()
580{
581 size_t i;
582
583 for( i = 0; i < COUNTOF(inc_int64); ++i )
584 {
585 bool fSuccess = true;
586 try
587 {
588 SafeInt< std::int64_t > si(inc_int64[i].x);
589 SafeInt< std::int64_t > vv = ++si;
590
591 if(vv != inc_int64[i].y)
592 {
593 fSuccess = false;
594 }
595 }
596 catch(SafeIntException&)
597 {
598 fSuccess = false;
599 }
600
601 if( fSuccess != inc_int64[i].fExpected )
602 {
603 cerr << "Error in case inc_int64 throw (1): ";
604 cerr << HEX(8) << inc_int64[i].x << ", ";
605 cerr << "expected = " << inc_int64[i].fExpected << endl;
606 }
607 }
608}
609
610void PostIncTestInt64()
611{

Callers 1

IncDecVerifyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected