#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stdint.h>
#include "base/bits.h"
#include "media/filters/h26x_annex_b_bitstream_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
namespace {
const uint64_t kTestPattern = …;
uint64_t GetDataFromBuffer(const uint8_t* ptr, uint64_t num_bits) { … }
}
class H26xAnnexBBitstreamBuilderAppendBitsTest
: public ::testing::TestWithParam<uint64_t> { … };
TEST_P(H26xAnnexBBitstreamBuilderAppendBitsTest, AppendAndVerifyBits) { … }
TEST_F(H26xAnnexBBitstreamBuilderAppendBitsTest, VerifyFlushAndBitsInBuffer) { … }
INSTANTIATE_TEST_SUITE_P(…);
}