Showing the changes to test/BaseDecoderTest.cpp (1 of 4 files). Show all
Unified · Split
| @@ -16,7 +16,7 @@ static void ReadFrame(std::ifstream* file, BufferedData* buf) { · 15 unmodified lines | |||
| 16 | if (file->gcount() != 1) { // end of file | 16 | if (file->gcount() != 1) { // end of file |
| 17 | return; | 17 | return; |
| 18 | } | 18 | } |
| 19 | if (!buf->Push(b)) { | 19 | if (!buf->PushBack(b)) { |
| 20 | FAIL() << "unable to allocate memory"; | 20 | FAIL() << "unable to allocate memory"; |
| 21 | } | 21 | } |
| 22 | 22 | ||
| @@ -76,7 +76,7 @@ void BaseDecoderTest::DecodeFrame(const uint8_t* src, int sliceSize, Callback* c · 53 unmodified lines | |||
| 76 | memset(data, 0, sizeof(data)); | 76 | memset(data, 0, sizeof(data)); |
| 77 | memset(&bufInfo, 0, sizeof(SBufferInfo)); | 77 | memset(&bufInfo, 0, sizeof(SBufferInfo)); |
| 78 | 78 | ||
| 79 | DECODING_STATE rv = decoder_->DecodeFrame(src, sliceSize, data, &bufInfo); | 79 | DECODING_STATE rv = decoder_->DecodeFrame2(src, sliceSize, data, &bufInfo); |
| 80 | ASSERT_TRUE(rv == dsErrorFree); | 80 | ASSERT_TRUE(rv == dsErrorFree); |
| 81 | 81 | ||
| 82 | if (bufInfo.iBufferStatus == 1 && cbk != NULL) { | 82 | if (bufInfo.iBufferStatus == 1 && cbk != NULL) { |
| @@ -107,7 +107,8 @@ void BaseDecoderTest::DecodeFile(const char* fileName, Callback* cbk) { · 24 unmodified lines | |||
| 107 | std::ifstream file(fileName, std::ios::in | std::ios::binary); | 107 | std::ifstream file(fileName, std::ios::in | std::ios::binary); |
| 108 | ASSERT_TRUE(file.is_open()); | 108 | ASSERT_TRUE(file.is_open()); |
| 109 | 109 | ||
| 110 | for (BufferedData buf;;) { | 110 | BufferedData buf; |
| 111 | while (true) { | ||
| 111 | ReadFrame(&file, &buf); | 112 | ReadFrame(&file, &buf); |
| 112 | if (::testing::Test::HasFatalFailure()) { | 113 | if (::testing::Test::HasFatalFailure()) { |
| 113 | return; | 114 | return; |