mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
implement blocks data conversion
This commit is contained in:
parent
28d746f371
commit
bc05716772
16 changed files with 341 additions and 23 deletions
|
|
@ -69,3 +69,16 @@ TEST(SmallHeap, EncodeDecode) {
|
|||
out.deserialize(bytes.data(), bytes.size());
|
||||
EXPECT_EQ(map, out);
|
||||
}
|
||||
|
||||
TEST(SmallHeap, Iterator) {
|
||||
SmallHeap<uint16_t, uint8_t> map;
|
||||
map.allocate(1, 10);
|
||||
map.allocate(2, 20);
|
||||
map.allocate(4, 14);
|
||||
|
||||
int sum = 0;
|
||||
for (const auto& it : map) {
|
||||
sum += it.size();
|
||||
}
|
||||
EXPECT_EQ(sum, 44);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue