|
gem5
v21.1.0.2
|
#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. More... | |
| TEST (SatCounterDeathTest, InitialValueExceeds) | |
| Test that an error is triggered when the initial value is higher than the maximum possible value. More... | |
| TEST (SatCounterTest, MaximumValue) | |
| Test if the maximum value is indeed the maximum value reachable. More... | |
| TEST (SatCounterTest, MinimumValue) | |
| Test if the minimum value is indeed the mimimum value reachable. More... | |
| TEST (SatCounterTest, InitialValue) | |
| Test initializing the counter with a value, updating it and then resetting. More... | |
| TEST (SatCounterTest, SaturationPercentile) | |
| Test calculating saturation percentile. More... | |
| TEST (SatCounterTest, Saturate) | |
| Test abrupt saturation. More... | |
| TEST (SatCounterTest, IntComparison) | |
| Test back and forth against an int. More... | |
| TEST (SatCounterTest, Shift) | |
| Test shift operators. More... | |
| TEST (SatCounterDeathTest, RightShiftNegative) | |
| Make sure the counters cannot be right-shifted by negative numbers, since that is undefined behaviour. More... | |
| TEST (SatCounterDeathTest, LeftShiftNegative) | |
| Make sure the counters cannot be left-shifted by negative numbers, since that is undefined behaviour. More... | |
| TEST (SatCounterTest, PrePostOperators) | |
| Test both pre and post operators. More... | |
| TEST (SatCounterTest, CopyMove) | |
| Test copy and move for both constructor and assignment. More... | |
| TEST (SatCounterTest, AddSubAssignment) | |
| Test add-assignment and subtract assignment. More... | |
| TEST (SatCounterTest, NegativeAddSubAssignment) | |
| Test add-assignment and subtract assignment using negative numbers. More... | |
| TEST (SatCounterTest, Size16) | |
| Test max and min when using SatCounter16. More... | |
| TEST (SatCounterTest, Size32) | |
| Test max and min when using SatCounter32. More... | |
| TEST (SatCounterTest, Size64) | |
| Test max and min when using SatCounter64. More... | |
| 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 244 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 229 of file sat_counter.test.cc.
| TEST | ( | SatCounterTest | , |
| AddSubAssignment | |||
| ) |
Test add-assignment and subtract assignment.
Definition at line 341 of file sat_counter.test.cc.
References gem5::bits().
| TEST | ( | SatCounterTest | , |
| CopyMove | |||
| ) |
Test copy and move for both constructor and assignment.
Definition at line 287 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 155 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 391 of file sat_counter.test.cc.
References gem5::bits().
| TEST | ( | SatCounterTest | , |
| PrePostOperators | |||
| ) |
Test both pre and post operators.
Definition at line 258 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 | , |
| 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 179 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 422 of file sat_counter.test.cc.
| TEST | ( | SatCounterTest | , |
| Size32 | |||
| ) |
Test max and min when using SatCounter32.
Definition at line 454 of file sat_counter.test.cc.
| TEST | ( | SatCounterTest | , |
| Size64 | |||
| ) |
Test max and min when using SatCounter64.
Definition at line 486 of file sat_counter.test.cc.