gem5  v22.1.0.0
Functions
flags.test.cc File Reference
#include <gtest/gtest.h>
#include <cstdint>
#include <limits>
#include "base/flags.hh"

Go to the source code of this file.

Functions

 TEST (FlagsTest, ConstructorZero)
 Test default zero-initialized constructor. More...
 
 TEST (FlagsTest, ConstructorSingle)
 Test constructor with a single-bit initial value. More...
 
 TEST (FlagsTest, ConstructorMulti)
 Test constructor with an initial multi-bit value. More...
 
 TEST (FlagsTest, TypeAssignment)
 Test assignment of variable of underlying type. More...
 
 TEST (FlagsTest, TypeAssignmentOverwrite)
 Test assignment of variable of underlying type, overwriting an initial value. More...
 
 TEST (FlagsTest, FlagsAssignment)
 Test assignment of other Flags. More...
 
 TEST (FlagsTest, FlagsAssignmentOverwrite)
 Test assignment of other Flags, overwriting an initial value. More...
 
 TEST (FlagsTest, IsSetValue)
 Test isSet for multiple bits set. More...
 
 TEST (FlagsTest, IsSetType)
 Test isSet comparing against another flag. More...
 
 TEST (FlagsTest, AllSetMatch)
 Test allSet comparing against another flag. More...
 
 TEST (FlagsTest, NoneSetMatch)
 Test noneSet comparing against another flag. More...
 
 TEST (FlagsTest, Clear)
 Test if no bits are set after a full clear. More...
 
 TEST (FlagsTest, ClearMatch)
 Test clearing specific bits. More...
 
 TEST (FlagsTest, SetOverlapping)
 Test setting with a few overlapping bits. More...
 
 TEST (FlagsTest, ConditionalSet)
 Test conditional set. More...
 
 TEST (FlagsTest, ReplaceOverlapping)
 Test replacing a masked selection of bits. More...
 

Function Documentation

◆ TEST() [1/16]

TEST ( FlagsTest  ,
AllSetMatch   
)

Test allSet comparing against another flag.

Definition at line 127 of file flags.test.cc.

References flags.

◆ TEST() [2/16]

TEST ( FlagsTest  ,
Clear   
)

Test if no bits are set after a full clear.

Definition at line 149 of file flags.test.cc.

References flags.

◆ TEST() [3/16]

TEST ( FlagsTest  ,
ClearMatch   
)

Test clearing specific bits.

Definition at line 158 of file flags.test.cc.

References flags.

◆ TEST() [4/16]

TEST ( FlagsTest  ,
ConditionalSet   
)

Test conditional set.

If true the selected bits are set; otherwise, they are cleared.

Definition at line 182 of file flags.test.cc.

References gem5::Flags< T >::set().

◆ TEST() [5/16]

TEST ( FlagsTest  ,
ConstructorMulti   
)

Test constructor with an initial multi-bit value.

Definition at line 54 of file flags.test.cc.

References flags.

◆ TEST() [6/16]

TEST ( FlagsTest  ,
ConstructorSingle   
)

Test constructor with a single-bit initial value.

Definition at line 46 of file flags.test.cc.

References flags.

◆ TEST() [7/16]

TEST ( FlagsTest  ,
ConstructorZero   
)

Test default zero-initialized constructor.

Definition at line 39 of file flags.test.cc.

References flags.

◆ TEST() [8/16]

TEST ( FlagsTest  ,
FlagsAssignment   
)

Test assignment of other Flags.

Definition at line 84 of file flags.test.cc.

◆ TEST() [9/16]

TEST ( FlagsTest  ,
FlagsAssignmentOverwrite   
)

Test assignment of other Flags, overwriting an initial value.

Definition at line 94 of file flags.test.cc.

◆ TEST() [10/16]

TEST ( FlagsTest  ,
IsSetType   
)

Test isSet comparing against another flag.

Definition at line 116 of file flags.test.cc.

References flags.

◆ TEST() [11/16]

TEST ( FlagsTest  ,
IsSetValue   
)

Test isSet for multiple bits set.

Definition at line 105 of file flags.test.cc.

References flags.

◆ TEST() [12/16]

TEST ( FlagsTest  ,
NoneSetMatch   
)

Test noneSet comparing against another flag.

Definition at line 137 of file flags.test.cc.

References flags.

◆ TEST() [13/16]

TEST ( FlagsTest  ,
ReplaceOverlapping   
)

Test replacing a masked selection of bits.

This means that bits of the original value that match the mask will be replaced by the bits of the new value that match the mask.

Definition at line 201 of file flags.test.cc.

References flags, and gem5::mask().

◆ TEST() [14/16]

TEST ( FlagsTest  ,
SetOverlapping   
)

Test setting with a few overlapping bits.

Definition at line 169 of file flags.test.cc.

References flags.

◆ TEST() [15/16]

TEST ( FlagsTest  ,
TypeAssignment   
)

Test assignment of variable of underlying type.

Definition at line 62 of file flags.test.cc.

References flags.

◆ TEST() [16/16]

TEST ( FlagsTest  ,
TypeAssignmentOverwrite   
)

Test assignment of variable of underlying type, overwriting an initial value.

Definition at line 74 of file flags.test.cc.

References flags.


Generated on Wed Dec 21 2022 10:22:53 for gem5 by doxygen 1.9.1