14 class TestBitFields :
public BitField<uword, int32_t, 1, 8> {};
17 EXPECT_EQ(0x00ffU, TestBitFields::mask());
18 EXPECT_EQ(0x001feU, TestBitFields::mask_in_place());
19 EXPECT_EQ(1, TestBitFields::shift());
20 EXPECT_EQ(8, TestBitFields::bitsize());
23 EXPECT_EQ(2U, TestBitFields::update(1, 16));
28 class F1 :
public BitField<T, intptr_t, 0, 8, true> {};
30 :
public BitField<T, uintptr_t, F1::kNextBit, 8, false> {
33 :
public BitField<T, intptr_t, F2::kNextBit, 8, true> {};
35 :
public BitField<T, uintptr_t, F3::kNextBit, 8, false> {
38 const uint32_t
value =
40 EXPECT_EQ(0x02fe01ffU,
value);
49 class F1 :
public BitField<T, intptr_t, 0, 8, false> {};
51 :
public BitField<T, uintptr_t, F1::kNextBit, 8, false> {
54 :
public BitField<T, intptr_t, F2::kNextBit, 8, false> {};
56 :
public BitField<T, uintptr_t, F3::kNextBit, 8, false> {
59 const uint32_t
value =
61 EXPECT_EQ(0x02fe01ffU,
value);
69 TestSignExtendedBitField<uint32_t>();
70 TestSignExtendedBitField<int32_t>();
74#define DEBUG_CRASH "Crash"
76#define DEBUG_CRASH "Pass"
80 class F :
public BitField<uint32_t, uint32_t, 0, 8, false> {};
static void F2(DFData *curr, int width)
static void encode(uint8_t output[16], const uint32_t input[4])
static bool is_valid(SkISize dim)
constexpr uint8_t kMaxUint8
VM_UNIT_TEST_CASE_WITH_EXPECTATION(BitFields_Assert, DEBUG_CRASH)
constexpr uint32_t kMaxUint32
static void TestNotSignExtendedBitField()
static void TestSignExtendedBitField()
VM_UNIT_TEST_CASE(DirectoryCurrentNoScope)
static DecodeResult decode(std::string path)