Lines Matching refs:tst
157 TestBitStruct tst{}; in TEST() local
161 EXPECT_EQ(1u, sizeof(tst._)); in TEST()
162 EXPECT_EQ(1u, sizeof(tst.i3)); in TEST()
163 EXPECT_EQ(1u, sizeof(tst.u4)); in TEST()
164 EXPECT_EQ(1u, sizeof(tst.alias_all)); in TEST()
167 tst.i3 = -1; in TEST()
168 tst.u4 = 0b1010; in TEST()
171 int8_t read_i3 = tst.i3; in TEST()
172 uint8_t read_u4 = tst.u4; in TEST()
179 EXPECT_EQ(0b1010111, static_cast<uint8_t>(tst.alias_all)); in TEST()
182 EXPECT_EQ(0b1010111u, AsUint(tst)); in TEST()
187 ++tst.u4; in TEST()
188 EXPECT_EQ(static_cast<uint8_t>(0b1011), static_cast<uint8_t>(tst.u4)); in TEST()
189 --tst.u4; in TEST()
190 EXPECT_EQ(static_cast<uint8_t>(0b1010), static_cast<uint8_t>(tst.u4)); in TEST()
193 uint8_t read_and_convert = tst.u4++; in TEST()
195 EXPECT_EQ(static_cast<uint8_t>(0b1010), static_cast<uint8_t>(tst.u4)); in TEST()
196 read_and_convert = tst.u4--; in TEST()
198 EXPECT_EQ(static_cast<uint8_t>(0b1010), static_cast<uint8_t>(tst.u4)); in TEST()
201 tst.u4 = 0b1010; in TEST()
202 EXPECT_TRUE(static_cast<bool>(tst.u4)); in TEST()
203 bool succ = tst.u4 ? true : false; in TEST()
206 tst.u4 = 0; in TEST()
207 EXPECT_FALSE(static_cast<bool>(tst.u4)); in TEST()
232 MixedSizeBitStruct tst{}; in TEST() local
235 tst.u3 = 0b111u; in TEST()
236 tst.u10 = 0b1111010100u; in TEST()
237 tst.u19 = 0b1010101010101010101u; in TEST()
240 uint8_t read_u3 = tst.u3; in TEST()
241 uint16_t read_u10 = tst.u10; in TEST()
242 uint32_t read_u19 = tst.u19; in TEST()
249 uint32_t read_all = tst.alias_all; in TEST()
255 EXPECT_EQ(0b10101010101010101011111010100111u, AsUint(tst)); in TEST()
270 TestBitStruct_u8 tst{}; in TEST() local
271 tst.i3 = all_1s.i3; in TEST()
274 EXPECT_EQ(0b111, tst.alias_all); in TEST()
278 TestBitStruct_u8 tst{}; in TEST() local
279 tst.u4 = all_1s.u4; in TEST()
282 EXPECT_EQ(0b1111000, tst.alias_all); in TEST()