BLI: new bit span data structure #104671

Merged
Jacques Lucke merged 26 commits from JacquesLucke/blender:bit-span into main 2023-02-17 00:42:54 +01:00
1 changed files with 6 additions and 0 deletions
Showing only changes of commit c08cb9f9bb - Show all commits

View File

@ -126,6 +126,12 @@ TEST(bit_span, SetSliced)
for (const int64_t i : IndexRange(640)) {
EXPECT_EQ(span[i], i >= 5 && i < 505);
}
span.slice(IndexRange(10, 190)).set(false);
for (const int64_t i : IndexRange(640)) {
EXPECT_EQ(span[i], (i >= 5 && i < 10) || (i >= 200 && i < 505));
}
}
} // namespace blender::bits::tests