27 #include <gtest/gtest.h> 45 TEST(BitMasks, is_true__true_0)
52 TEST(BitMasks, is_true__false_1)
59 TEST(BitMasks, is_false__false_0)
66 TEST(BitMasks, is_false__true_1)
73 TEST(BitMasksGlobal, is_true__true)
83 TEST(BitMasksGlobal, is_false__false)
93 TEST(BitMasksGlobal, is_true__false)
102 TEST(BitMasksGlobal, is_false__true)
111 TEST(CounterWithOverflow, no_overflows)
113 int received_val, full_val = 0;
117 EXPECT_EQ(full_val, 1000);
119 received_val = 65535;
121 EXPECT_EQ(full_val, 65535);
124 TEST(CounterWithOverflow, with_overflows)
126 int received_val, full_val = 0;
131 EXPECT_EQ(full_val, 65536);
135 EXPECT_EQ(full_val, 66536);
139 EXPECT_EQ(full_val, 131072);
143 int main(
int argc,
char **argv)
145 testing::InitGoogleTest(&argc, argv);
146 return RUN_ALL_TESTS();
static uint64_t counter_with_overflow(uint64_t full_value, uint16_t new_value)
static int ipow(int base, int exp)
int main(int argc, char **argv)
static bool is_bit_mask_index_true(int64_t bit_mask, int index)
static bool is_bit_mask_index_false(int64_t bit_mask, int index)
This is a header library used to implement some useful math functions. It is used in our different pa...