gem5  v21.1.0.2
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 gem5::Flags< T >::allSet().

◆ 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 gem5::Flags< T >::clear().

◆ TEST() [3/16]

TEST ( FlagsTest  ,
ClearMatch   
)

Test clearing specific bits.

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

References gem5::Flags< T >::clear(), and gem5::Flags< T >::isSet().

◆ 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.

◆ TEST() [6/16]

TEST ( FlagsTest  ,
ConstructorSingle   
)

Test constructor with a single-bit initial value.

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

◆ TEST() [7/16]

TEST ( FlagsTest  ,
ConstructorZero   
)

Test default zero-initialized constructor.

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

◆ 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 gem5::Flags< T >::isSet().

◆ TEST() [11/16]

TEST ( FlagsTest  ,
IsSetValue   
)

Test isSet for multiple bits set.

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

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

◆ TEST() [12/16]

TEST ( FlagsTest  ,
NoneSetMatch   
)

Test noneSet comparing against another flag.

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

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

◆ 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 gem5::mask(), and gem5::Flags< T >::replace().

◆ TEST() [14/16]

TEST ( FlagsTest  ,
SetOverlapping   
)

Test setting with a few overlapping bits.

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

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

◆ TEST() [15/16]

TEST ( FlagsTest  ,
TypeAssignment   
)

Test assignment of variable of underlying type.

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

◆ 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.


Generated on Tue Sep 21 2021 12:26:26 for gem5 by doxygen 1.8.17