Skip to content

Commit

Permalink
correction related to code review
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Apr 22, 2024
1 parent b9ae11b commit 49d4f13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test_conformance/printf/util_printf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,15 +1039,15 @@ size_t verifyOutputBuffer(char *analysisBuffer,testCase* pTestCase,size_t testId
return strcmp(eCorrectBuffer,exp);
}

if (!strcmp(pTestCase->_correctBuffer[testId].c_str(), "inf"))
if (pTestCase->_correctBuffer[testId] == "inf")
return strcmp(analysisBuffer, "inf")
&& strcmp(analysisBuffer, "infinity");
else if (!strcmp(pTestCase->_correctBuffer[testId].c_str(), "INF"))
else if (pTestCase->_correctBuffer[testId] == "INF")
return strcmp(analysisBuffer, "INF")
&& strcmp(analysisBuffer, "INFINITY");
else if (!strcmp(pTestCase->_correctBuffer[testId].c_str(), "nan"))
else if (pTestCase->_correctBuffer[testId] == "nan")
return strcmp(analysisBuffer, "nan") && strcmp(analysisBuffer, "-nan");
else if (!strcmp(pTestCase->_correctBuffer[testId].c_str(), "NAN"))
else if (pTestCase->_correctBuffer[testId] == "NAN")
return strcmp(analysisBuffer, "NAN") && strcmp(analysisBuffer, "-NAN");

return strcmp(analysisBuffer, pTestCase->_correctBuffer[testId].c_str());
Expand Down

0 comments on commit 49d4f13

Please sign in to comment.