30 flags = WriteFlags::CORK;
35 static_cast<uint32_t>(WriteFlags::CORK) |
36 static_cast<uint32_t>(WriteFlags::EOR));
41 TEST(WriteFlagsTest, unionOperator) {
46 static_cast<uint32_t>(WriteFlags::CORK) |
47 static_cast<uint32_t>(WriteFlags::EOR));
48 ASSERT_EQ(flags, WriteFlags::CORK | WriteFlags::EOR);
51 TEST(WriteFlagsTest, intersectionOperator) {
52 ASSERT_EQ(WriteFlags::NONE & WriteFlags::CORK, WriteFlags::NONE);
55 WriteFlags::CORK | WriteFlags::EOR | WriteFlags::WRITE_SHUTDOWN;
56 ASSERT_EQ(flags & WriteFlags::CORK, WriteFlags::CORK);
57 ASSERT_EQ(flags & WriteFlags::EOR, WriteFlags::EOR);
58 ASSERT_EQ(flags & WriteFlags::WRITE_SHUTDOWN, WriteFlags::WRITE_SHUTDOWN);
61 TEST(WriteFlagsTest, exclusionOperator) {
71 TEST(WriteFlagsTest, unsetOperator) {
73 WriteFlags::CORK | WriteFlags::EOR | WriteFlags::WRITE_SHUTDOWN;
78 flags = WriteFlags::CORK;
84 TEST(WriteFlagsTest, compoundAssignmentUnionOperator) {
86 flags |= WriteFlags::CORK;
89 flags = WriteFlags::CORK;
90 flags |= WriteFlags::EOR;
91 ASSERT_EQ(flags, WriteFlags::CORK | WriteFlags::EOR);
93 flags = WriteFlags::CORK | WriteFlags::EOR;
94 flags |= WriteFlags::CORK;
95 ASSERT_EQ(flags, WriteFlags::CORK | WriteFlags::EOR);
98 TEST(WriteFlagsTest, compoundAssignmentIntersectionOperator) {
100 flags &= WriteFlags::CORK;
103 flags = WriteFlags::CORK | WriteFlags::EOR;
104 flags &= WriteFlags::EOR;
107 flags = WriteFlags::NONE;
108 flags &= WriteFlags::EOR;
#define ASSERT_EQ(val1, val2)
—— Concurrent Priority Queue Implementation ——
bool isSet(WriteFlags a, WriteFlags b)
TEST(GTestEnvVarTest, Dummy)
#define ASSERT_FALSE(condition)
#define ASSERT_TRUE(condition)