| 108 | }; |
| 109 | |
| 110 | TEST(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 | |
| 123 | void check_var_uint32(int32_t start_offset, std::shared_ptr<Buffer> buffer, |
| 124 | int32_t value, uint32_t bytes_written) { |
nothing calls this directly
no test coverage detected