diff --git a/protocol/src/test/cpp/test/byte_buffer_test.h b/protocol/src/test/cpp/test/byte_buffer_test.h index 31eb9fc0..bf1ed74a 100644 --- a/protocol/src/test/cpp/test/byte_buffer_test.h +++ b/protocol/src/test/cpp/test/byte_buffer_test.h @@ -113,8 +113,8 @@ namespace byte_buffer_test { ByteBuffer buffer; assert(buffer.getCapacity() == DEFAULT_BUFFER_SIZE); - assert(buffer.writerIndex() == 0); - assert(buffer.readerIndex() == 0); + assert(buffer.getWriterOffset() == 0); + assert(buffer.getReaderOffset() == 0); boolTest(buffer); byteTest(buffer); diff --git a/protocol/src/test/cpp/test/serialization_test.h b/protocol/src/test/cpp/test/serialization_test.h index 75a78a54..d77d0a9b 100644 --- a/protocol/src/test/cpp/test/serialization_test.h +++ b/protocol/src/test/cpp/test/serialization_test.h @@ -96,7 +96,7 @@ namespace serialization_test { obj = *((NormalObject *) read(newBuffer)); cout << "source size " << length << endl; - cout << "target size " << newBuffer.writerIndex() << endl; + cout << "target size " << newBuffer.getWriterOffset() << endl; cout << "compatible test" << endl; } diff --git a/protocol/src/test/cpp/zfoocpp/ByteBuffer.h b/protocol/src/test/cpp/zfoocpp/ByteBuffer.h index 7a7511d7..fad7982c 100644 --- a/protocol/src/test/cpp/zfoocpp/ByteBuffer.h +++ b/protocol/src/test/cpp/zfoocpp/ByteBuffer.h @@ -475,6 +475,7 @@ namespace zfoo { } inline list readBoolList() { + int32_t length = readInt(); list list; for (auto i = 0; i < length; i++) {