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

Function MultVerifyInt64Int

Archive/releases/5/MulTest.cpp:1044–1057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1042};
1043
1044void MultVerifyInt64Int()
1045{
1046 size_t i;
1047
1048 for( i = 0; i < sizeof(int64_int)/sizeof(int64_int[0]); ++i )
1049 {
1050 __int64 ret;
1051 if( SafeMultiply(int64_int[i].x, int64_int[i].y, ret) != int64_int[i].fExpected )
1052 {
1053 //assert(false);
1054 printf("Error in case %I64X, %I64X, expected = %s\n", int64_int[i].x, int64_int[i].y, int64_int[i].fExpected ? "true" : "false");
1055 }
1056 }
1057}
1058
1059MultTest< __int64, unsigned __int32 > int64_uint[] =
1060{

Callers 1

MultVerifyFunction · 0.70

Calls 1

SafeMultiplyFunction · 0.70

Tested by

no test coverage detected