| 38 | namespace util { |
| 39 | |
| 40 | TEST(TotalBufferSize, Arrays) { |
| 41 | std::shared_ptr<Array> no_nulls = ArrayFromJSON(int16(), "[1, 2, 3]"); |
| 42 | ASSERT_EQ(6, TotalBufferSize(*no_nulls->data())); |
| 43 | |
| 44 | std::shared_ptr<Array> with_nulls = |
| 45 | ArrayFromJSON(int16(), "[1, 2, 3, 4, null, 6, 7, 8, 9]"); |
| 46 | ASSERT_EQ(20, TotalBufferSize(*with_nulls->data())); |
| 47 | } |
| 48 | |
| 49 | TEST(TotalBufferSize, NestedArray) { |
| 50 | std::shared_ptr<Array> array_with_children = |
nothing calls this directly
no test coverage detected