History

minor naming/style/bug fixes

jwwang committed 12 years ago

Commit 94bd0971 parent 0c2227e4 files · +14 −10Browse files

Showing the changes to test/BaseDecoderTest.cpp (1 of 4 files). Show all

Unified · Split

test/BaseDecoderTest.cpp+4−3
@@ -16,7 +16,7 @@ static void ReadFrame(std::ifstream* file, BufferedData* buf) { · 15 unmodified lines
1616 if (file->gcount() != 1) { // end of file
1717 return;
1818 }
19− if (!buf->Push(b)) {
19+ if (!buf->PushBack(b)) {
2020 FAIL() << "unable to allocate memory";
2121 }
2222
@@ -76,7 +76,7 @@ void BaseDecoderTest::DecodeFrame(const uint8_t* src, int sliceSize, Callback* c · 53 unmodified lines
7676 memset(data, 0, sizeof(data));
7777 memset(&bufInfo, 0, sizeof(SBufferInfo));
7878
79− DECODING_STATE rv = decoder_->DecodeFrame(src, sliceSize, data, &bufInfo);
79+ DECODING_STATE rv = decoder_->DecodeFrame2(src, sliceSize, data, &bufInfo);
8080 ASSERT_TRUE(rv == dsErrorFree);
8181
8282 if (bufInfo.iBufferStatus == 1 && cbk != NULL) {
@@ -107,7 +107,8 @@ void BaseDecoderTest::DecodeFile(const char* fileName, Callback* cbk) { · 24 unmodified lines
107107 std::ifstream file(fileName, std::ios::in | std::ios::binary);
108108 ASSERT_TRUE(file.is_open());
109109
110− for (BufferedData buf;;) {
110+ BufferedData buf;
111+ while (true) {
111112 ReadFrame(&file, &buf);
112113 if (::testing::Test::HasFatalFailure()) {
113114 return;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t