MCPcopy Create free account
hub / github.com/apache/fory / TEST

Function TEST

cpp/fory/util/buffer_test.cc:110–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108};
109
110TEST(Buffer, to_string) {
111 std::shared_ptr<Buffer> buffer;
112 allocate_buffer(16, &buffer);
113 for (int i = 0; i < 16; ++i) {
114 buffer->unsafe_put_byte<int8_t>(i, static_cast<int8_t>('a' + i));
115 }
116 EXPECT_EQ(buffer->to_string(), "abcdefghijklmnop");
117
118 float f = 1.11;
119 buffer->unsafe_put<float>(0, f);
120 EXPECT_EQ(buffer->get<float>(0), f);
121}
122
123void check_var_uint32(int32_t start_offset, std::shared_ptr<Buffer> buffer,
124 int32_t value, uint32_t bytes_written) {

Callers

nothing calls this directly

Calls 15

allocate_bufferFunction · 0.85
check_var_uint32Function · 0.85
check_var_uint64Function · 0.85
get_bytes_as_int64Method · 0.80
get_var_uint32Method · 0.80
reader_indexMethod · 0.80
get_var_uint64Method · 0.80
writer_indexMethod · 0.80
ensure_readableMethod · 0.80
get_bufferMethod · 0.80
shrink_input_bufferMethod · 0.80
write_callsMethod · 0.80

Tested by

no test coverage detected