GDB (xrefs)
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions | Variables
selftests::enum_flags_tests Namespace Reference

Typedefs

typedef std::underlying_type< RE >::type und
 

Enumerations

enum  RE { RE_FLAG1 = 1 << 1 , RE_FLAG2 = 1 << 2 }
 
enum  RE2 { RE2_FLAG1 = 1 << 1 , RE2_FLAG2 = 1 << 2 }
 
enum  URE : unsigned { URE_FLAG1 = 1 << 1 , URE_FLAG2 = 1 << 2 , URE_FLAG3 = 0xffffffff }
 
enum  NF { NF_FLAG1 = 1 << 1 , NF_FLAG2 = 1 << 2 }
 
enum  test_uflag : unsigned { UFLAG1 = 1 << 0 , UFLAG2 = 1 << 1 , UFLAG3 = 1 << 2 , UFLAG4 = 1 << 3 }
 

Functions

 DEF_ENUM_FLAGS_TYPE (RE, EF)
 
 DEF_ENUM_FLAGS_TYPE (RE2, EF2)
 
 DEF_ENUM_FLAGS_TYPE (URE, UEF)
 
 CHECK_VALID (CHECK_VALID(true, CHECK_VALID(und, und(RE()))
 
 DEF_ENUM_FLAGS_TYPE (test_flag, test_flags)
 
 DEF_ENUM_FLAGS_TYPE (test_uflag, test_uflags)
 
static std::string to_string_flags (test_flags flags)
 
static std::string to_string_uflags (test_uflags flags)
 
static void self_test ()
 

Variables

static RE re ATTRIBUTE_UNUSED
 

Typedef Documentation

◆ und

typedef std::underlying_type<RE>::type selftests::enum_flags_tests::und

Definition at line 93 of file enum-flags-selftests.c.

Enumeration Type Documentation

◆ NF

Enumerator
NF_FLAG1 
NF_FLAG2 

Definition at line 55 of file enum-flags-selftests.c.

◆ RE

Enumerator
RE_FLAG1 
RE_FLAG2 

Definition at line 33 of file enum-flags-selftests.c.

◆ RE2

Enumerator
RE2_FLAG1 
RE2_FLAG2 

Definition at line 40 of file enum-flags-selftests.c.

◆ test_uflag

Enumerator
UFLAG1 
UFLAG2 
UFLAG3 
UFLAG4 

Definition at line 368 of file enum-flags-selftests.c.

◆ URE

Enumerator
URE_FLAG1 
URE_FLAG2 
URE_FLAG3 

Definition at line 47 of file enum-flags-selftests.c.

Function Documentation

◆ CHECK_VALID()

selftests::enum_flags_tests::CHECK_VALID ( CHECK_VALID ( true,
CHECK_VALID ( und,
und(RE())  )

Definition at line 98 of file enum-flags-selftests.c.

◆ DEF_ENUM_FLAGS_TYPE() [1/5]

selftests::enum_flags_tests::DEF_ENUM_FLAGS_TYPE ( RE ,
EF  )

◆ DEF_ENUM_FLAGS_TYPE() [2/5]

selftests::enum_flags_tests::DEF_ENUM_FLAGS_TYPE ( RE2 ,
EF2  )

◆ DEF_ENUM_FLAGS_TYPE() [3/5]

selftests::enum_flags_tests::DEF_ENUM_FLAGS_TYPE ( test_flag ,
test_flags  )

◆ DEF_ENUM_FLAGS_TYPE() [4/5]

selftests::enum_flags_tests::DEF_ENUM_FLAGS_TYPE ( test_uflag ,
test_uflags  )

◆ DEF_ENUM_FLAGS_TYPE() [5/5]

selftests::enum_flags_tests::DEF_ENUM_FLAGS_TYPE ( URE ,
UEF  )

◆ self_test()

static void selftests::enum_flags_tests::self_test ( )
static

◆ to_string_flags()

static std::string selftests::enum_flags_tests::to_string_flags ( test_flags flags)
static

Definition at line 384 of file enum-flags-selftests.c.

References flags.

Referenced by self_test().

◆ to_string_uflags()

static std::string selftests::enum_flags_tests::to_string_uflags ( test_uflags flags)
static

Definition at line 394 of file enum-flags-selftests.c.

References flags, UFLAG1, and UFLAG3.

Referenced by self_test().

Variable Documentation

◆ ATTRIBUTE_UNUSED

static EF ef selftests::enum_flags_tests::ATTRIBUTE_UNUSED
static

Definition at line 78 of file enum-flags-selftests.c.