Flutter Engine
The Flutter Engine
Enumerations | Functions
SkEnumBitMaskTest.cpp File Reference
#include "src/base/SkEnumBitMask.h"
#include "tests/Test.h"

Go to the source code of this file.

Enumerations

enum class  Flags {
  kBig_Flag = 1 << 0 , kAA_Flag = 1 << 1 , kStroke_Flag = 1 << 0 , kBig_Flag = 1 << 1 ,
  kNone = 0 , kA = 1 , kB = 2 , kC = 4
}
 

Functions

 DEF_TEST (skgpu_Mask, r)
 

Enumeration Type Documentation

◆ Flags

enum class Flags
strong
Enumerator
kBig_Flag 
kAA_Flag 
kStroke_Flag 
kBig_Flag 
kNone 
kA 
kB 
kC 

Definition at line 11 of file SkEnumBitMaskTest.cpp.

11 {
12 kNone = 0,
13 kA = 1,
14 kB = 2,
15 kC = 4
16};
const auto kC
const auto kB
const auto kA
@ kNone
Definition: layer.h:53

Function Documentation

◆ DEF_TEST()

DEF_TEST ( skgpu_Mask  ,
 
)

Definition at line 19 of file SkEnumBitMaskTest.cpp.

19 {
27 auto mask = Flags::kB | Flags::kC;
28 REPORTER_ASSERT(r, (flags & mask) == mask);
30 flags &= ~Flags::kC;
32 REPORTER_ASSERT(r, (flags & mask) != mask);
33 REPORTER_ASSERT(r, (flags & mask) != Flags::kNone);
34 REPORTER_ASSERT(r, (flags & mask));
36 flags &= ~Flags::kB;
37 REPORTER_ASSERT(r, (flags & mask) == Flags::kNone);
38 REPORTER_ASSERT(r, !(flags & mask));
40 flags = (flags | flags) ^ (flags);
42 flags ^= mask;
43 REPORTER_ASSERT(r, flags == mask);
46}
#define REPORTER_ASSERT(r, cond,...)
Definition: Test.h:286
FlutterSemanticsFlag flags