MSVC warns when comparing integers with booleans in with the gtest assertion macros.
Showing the changes to test/decoder (1 of 3 files). Show all
Unified · Split
| @@ -271,7 +271,7 @@ void DecoderInterfaceTest::TestEndOfStream() { · 270 unmodified lines | ||
| 271 | 271 | EXPECT_EQ (eRet, cmResultSuccess); |
| 272 | 272 | eRet = (CM_RETURN) m_pDec->GetOption (DECODER_OPTION_END_OF_STREAM, &iOut); |
| 273 | 273 | EXPECT_EQ (eRet, cmResultSuccess); |
| 274 | − EXPECT_EQ (iOut, iTmp != 0); | |
| 274 | + EXPECT_EQ (iOut, iTmp != 0 ? 1 : 0); | |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | //set false as input |
| @@ -281,7 +281,7 @@ void DecoderInterfaceTest::TestEndOfStream() { · 3 unmodified lines | ||
| 281 | 281 | eRet = (CM_RETURN) m_pDec->GetOption (DECODER_OPTION_END_OF_STREAM, &iOut); |
| 282 | 282 | EXPECT_EQ (eRet, cmResultSuccess); |
| 283 | 283 | |
| 284 | − EXPECT_EQ (iOut, false); | |
| 284 | + EXPECT_EQ (iOut, 0); | |
| 285 | 285 | |
| 286 | 286 | //set true as input |
| 287 | 287 | iTmp = true; |
| @@ -290,24 +290,24 @@ void DecoderInterfaceTest::TestEndOfStream() { · 2 unmodified lines | ||
| 290 | 290 | eRet = (CM_RETURN) m_pDec->GetOption (DECODER_OPTION_END_OF_STREAM, &iOut); |
| 291 | 291 | EXPECT_EQ (eRet, cmResultSuccess); |
| 292 | 292 | |
| 293 | − EXPECT_EQ (iOut, true); | |
| 293 | + EXPECT_EQ (iOut, 1); | |
| 294 | 294 | |
| 295 | 295 | //Mock data packet in |
| 296 | 296 | //Test NULL data input for decoder, should be true for EOS |
| 297 | 297 | eRet = (CM_RETURN) m_pDec->DecodeFrame2 (NULL, 0, m_pData, &m_sBufferInfo); |
| 298 | 298 | EXPECT_EQ (eRet, 0); //decode should return OK |
| 299 | 299 | eRet = (CM_RETURN) m_pDec->GetOption (DECODER_OPTION_END_OF_STREAM, &iOut); |
| 300 | − EXPECT_EQ (iOut, true); //decoder should have EOS == true | |
| 300 | + EXPECT_EQ (iOut, 1); //decoder should have EOS == true | |
| 301 | 301 | |
| 302 | 302 | //Test valid data input for decoder, should be false for EOS |
| 303 | 303 | MockPacketType (NAL_UNIT_UNSPEC_0, 50); |
| 304 | 304 | eRet = (CM_RETURN) m_pDec->DecodeFrame2 (m_szBuffer, m_iBufLength, m_pData, &m_sBufferInfo); |
| 305 | 305 | eRet = (CM_RETURN) m_pDec->GetOption (DECODER_OPTION_END_OF_STREAM, &iOut); |
| 306 | − EXPECT_EQ (iOut, false); //decoder should have EOS == false | |
| 306 | + EXPECT_EQ (iOut, 0); //decoder should have EOS == false | |
| 307 | 307 | //Test NULL data input for decoder, should be true for EOS |
| 308 | 308 | eRet = (CM_RETURN) m_pDec->DecodeFrame2 (NULL, 0, m_pData, &m_sBufferInfo); |
| 309 | 309 | eRet = (CM_RETURN) m_pDec->GetOption (DECODER_OPTION_END_OF_STREAM, &iOut); |
| 310 | − EXPECT_EQ (iOut, true); //decoder should have EOS == true | |
| 310 | + EXPECT_EQ (iOut, 1); //decoder should have EOS == true | |
| 311 | 311 | |
| 312 | 312 | Uninit(); |
| 313 | 313 | } |