gem5 v24.0.0.0
|
#include <gtest/gtest-spi.h>
#include <gtest/gtest.h>
#include <utility>
#include "base/gtest/logging.hh"
#include "base/sat_counter.hh"
Go to the source code of this file.
Functions | |
TEST (SatCounterDeathTest, BitCountExceeds) | |
Test that an error is triggered when the number of bits exceeds the counter's capacity. | |
TEST (SatCounterDeathTest, InitialValueExceeds) | |
Test that an error is triggered when the initial value is higher than the maximum possible value. | |
TEST (SatCounterTest, MaximumValue) | |
Test if the maximum value is indeed the maximum value reachable. | |
TEST (SatCounterTest, MinimumValue) | |
Test if the minimum value is indeed the mimimum value reachable. | |
TEST (SatCounterTest, InitialValue) | |
Test initializing the counter with a value, updating it and then resetting. | |
TEST (SatCounterTest, SaturationPercentile) | |
Test calculating saturation percentile. | |
TEST (SatCounterTest, Saturate) | |
Test abrupt saturation. | |
TEST (SatCounterTest, Saturate16) | |
TEST (SatCounterTest, IntComparison) | |
Test back and forth against an int. | |
TEST (SatCounterTest, Shift) | |
Test shift operators. | |
TEST (SatCounterDeathTest, RightShiftNegative) | |
Make sure the counters cannot be right-shifted by negative numbers, since that is undefined behaviour. | |
TEST (SatCounterDeathTest, LeftShiftNegative) | |
Make sure the counters cannot be left-shifted by negative numbers, since that is undefined behaviour. | |
TEST (SatCounterTest, PrePostOperators) | |
Test both pre and post operators. | |
TEST (SatCounterTest, CopyMove) | |
Test copy and move for both constructor and assignment. | |
TEST (SatCounterTest, AddSubAssignment) | |
Test add-assignment and subtract assignment. | |
TEST (SatCounterTest, NegativeAddSubAssignment) | |
Test add-assignment and subtract assignment using negative numbers. | |
TEST (SatCounterTest, Size16) | |
Test max and min when using SatCounter16. | |
TEST (SatCounterTest, Size32) | |
Test max and min when using SatCounter32. | |
TEST (SatCounterTest, Size64) | |
Test max and min when using SatCounter64. | |
TEST | ( | SatCounterDeathTest | , |
BitCountExceeds | ) |
Test that an error is triggered when the number of bits exceeds the counter's capacity.
Definition at line 43 of file sat_counter.test.cc.
References gem5::gtestLogOutput.
TEST | ( | SatCounterDeathTest | , |
InitialValueExceeds | ) |
Test that an error is triggered when the initial value is higher than the maximum possible value.
Definition at line 60 of file sat_counter.test.cc.
References gem5::gtestLogOutput.
TEST | ( | SatCounterDeathTest | , |
LeftShiftNegative | ) |
Make sure the counters cannot be left-shifted by negative numbers, since that is undefined behaviour.
Definition at line 258 of file sat_counter.test.cc.
TEST | ( | SatCounterDeathTest | , |
RightShiftNegative | ) |
Make sure the counters cannot be right-shifted by negative numbers, since that is undefined behaviour.
Definition at line 243 of file sat_counter.test.cc.
TEST | ( | SatCounterTest | , |
AddSubAssignment | ) |
Test add-assignment and subtract assignment.
Definition at line 355 of file sat_counter.test.cc.
References gem5::bits().
TEST | ( | SatCounterTest | , |
CopyMove | ) |
Test copy and move for both constructor and assignment.
Definition at line 301 of file sat_counter.test.cc.
References gem5::bits(), gem5::ArmISA::i, and gem5::GenericSatCounter< T >::reset().
TEST | ( | SatCounterTest | , |
InitialValue | ) |
Test initializing the counter with a value, updating it and then resetting.
Definition at line 107 of file sat_counter.test.cc.
References gem5::bits(), and gem5::GenericSatCounter< T >::reset().
TEST | ( | SatCounterTest | , |
IntComparison | ) |
Test back and forth against an int.
Definition at line 169 of file sat_counter.test.cc.
References gem5::bits().
TEST | ( | SatCounterTest | , |
MaximumValue | ) |
Test if the maximum value is indeed the maximum value reachable.
Definition at line 76 of file sat_counter.test.cc.
References gem5::bits(), and gem5::ArmISA::i.
TEST | ( | SatCounterTest | , |
MinimumValue | ) |
Test if the minimum value is indeed the mimimum value reachable.
Definition at line 92 of file sat_counter.test.cc.
References gem5::bits(), and gem5::ArmISA::i.
TEST | ( | SatCounterTest | , |
NegativeAddSubAssignment | ) |
Test add-assignment and subtract assignment using negative numbers.
Definition at line 405 of file sat_counter.test.cc.
References gem5::bits().
TEST | ( | SatCounterTest | , |
PrePostOperators | ) |
Test both pre and post operators.
Definition at line 272 of file sat_counter.test.cc.
References gem5::bits(), and gem5::ArmISA::i.
TEST | ( | SatCounterTest | , |
Saturate | ) |
Test abrupt saturation.
Definition at line 138 of file sat_counter.test.cc.
References gem5::bits(), gem5::GenericSatCounter< T >::isSaturated(), and gem5::GenericSatCounter< T >::saturate().
TEST | ( | SatCounterTest | , |
Saturate16 | ) |
Definition at line 152 of file sat_counter.test.cc.
References gem5::bits(), gem5::GenericSatCounter< T >::isSaturated(), and gem5::GenericSatCounter< T >::saturate().
TEST | ( | SatCounterTest | , |
SaturationPercentile | ) |
Test calculating saturation percentile.
Definition at line 121 of file sat_counter.test.cc.
References gem5::bits(), gem5::GenericSatCounter< T >::calcSaturation(), and gem5::GenericSatCounter< T >::isSaturated().
TEST | ( | SatCounterTest | , |
Shift | ) |
Test shift operators.
Definition at line 193 of file sat_counter.test.cc.
References gem5::bits(), and gem5::GenericSatCounter< T >::reset().
TEST | ( | SatCounterTest | , |
Size16 | ) |
Test max and min when using SatCounter16.
Definition at line 436 of file sat_counter.test.cc.
TEST | ( | SatCounterTest | , |
Size32 | ) |
Test max and min when using SatCounter32.
Definition at line 468 of file sat_counter.test.cc.
TEST | ( | SatCounterTest | , |
Size64 | ) |
Test max and min when using SatCounter64.
Definition at line 500 of file sat_counter.test.cc.