gem5 v24.0.0.0
|
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "base/gtest/logging.hh"
#include "base/logging.hh"
Go to the source code of this file.
Classes | |
class | LoggingFixture |
Temporarily redirects cerr to gtestLogOutput. More... | |
Functions | |
TEST_F (LoggingFixture, BasicPrint) | |
Test the most basic print. | |
TEST_F (LoggingFixture, VariadicCharPrint) | |
Test the variadic-arg print for chars. | |
TEST_F (LoggingFixture, VariadicStringPrint) | |
Test the variadic-arg print for strings. | |
TEST_F (LoggingFixture, VariadicCharMissingPrint) | |
Test the variadic-arg print for chars with arguments missing. | |
TEST_F (LoggingFixture, VariadicStringMissingPrint) | |
Test the variadic-arg print for strings with arguments missing. | |
TEST_F (LoggingFixture, DisabledPrint) | |
Test that no message is shown when printing with a disabled logger. | |
TEST_F (LoggingFixture, WarnLoggerPrint) | |
Test printing with the warn logger, enabled and disabled. | |
TEST_F (LoggingFixture, InfoLoggerPrint) | |
Test printing with the info logger, enabled and disabled. | |
TEST_F (LoggingFixture, HackLoggerPrint) | |
Test printing with the hack logger, enabled and disabled. | |
TEST_F (LoggingFixture, FatalLoggerPrint) | |
Test printing with the fatal logger, enabled and disabled. | |
TEST_F (LoggingFixture, PanicLoggerPrint) | |
Test printing with the panic logger, which cannot be disabled. | |
TEST_F (LoggingFixture, BaseMessage) | |
Test macro base_message. | |
TEST_F (LoggingFixture, BaseMessageOnce) | |
Test that base_message_once only prints the message once in a loop. | |
TEST_F (LoggingFixture, Warn) | |
Test macro warn. | |
TEST_F (LoggingFixture, Inform) | |
Test macro inform. | |
TEST_F (LoggingFixture, Hack) | |
Test macro hack. | |
TEST_F (LoggingFixture, WarnOnce) | |
Test that warn_once only prints the message once in a loop. | |
TEST_F (LoggingFixture, InformOnce) | |
Test that inform_once only prints the message once in a loop. | |
TEST_F (LoggingFixture, HackOnce) | |
Test that hack_once only prints the message once in a loop. | |
TEST_F (LoggingFixture, WarnIf) | |
Test that warn_if only prints the message when the condition is true. | |
TEST_F (LoggingFixture, WarnIfOnce) | |
Test that warn_if_once only prints the message once in a loop. | |
TEST (LoggingDeathTest, EmptyPrefix) | |
Test that a logger cannot be created with an empty prefix. | |
TEST (LoggingDeathTest, ExitHelper) | |
Test that the test logger's exit helper will end execution gracefully. | |
TEST (LoggingDeathTest, WarnLoggerExitHelper) | |
Test that the warn logger's exit helper will end execution gracefully. | |
TEST (LoggingDeathTest, InfoLoggerExitHelper) | |
Test that the info logger's exit helper will end execution gracefully. | |
TEST (LoggingDeathTest, HackLoggerExitHelper) | |
Test that the hack logger's exit helper will end execution gracefully. | |
TEST (LoggingDeathTest, FatalLoggerExitHelper) | |
Test that the fatal logger's exit helper will end execution with error. | |
TEST (LoggingDeathTest, PanicLoggerExitHelper) | |
Test that the panic logger's exit helper will end execution with error. | |
TEST (LoggingDeathTest, ExitMessage) | |
Test that exit_message prints a message and exits. | |
TEST (LoggingDeathTest, Panic) | |
Test macro panic. | |
TEST (LoggingDeathTest, Fatal) | |
Test macro fatal. | |
TEST (LoggingDeathTest, PanicIf) | |
Test that panic_if only prints the message when the condition is true. | |
TEST (LoggingDeathTest, FatalIf) | |
Test that fatal_if only prints the message when the condition is true. | |
TEST (LoggingDeathTest, gem5Assert) | |
Test macro gem5_assert. | |
TEST | ( | LoggingDeathTest | , |
EmptyPrefix | ) |
Test that a logger cannot be created with an empty prefix.
Definition at line 464 of file logging.test.cc.
TEST | ( | LoggingDeathTest | , |
ExitHelper | ) |
Test that the test logger's exit helper will end execution gracefully.
Definition at line 474 of file logging.test.cc.
TEST | ( | LoggingDeathTest | , |
ExitMessage | ) |
Test that exit_message prints a message and exits.
Definition at line 510 of file logging.test.cc.
References exit_message.
TEST | ( | LoggingDeathTest | , |
Fatal | ) |
TEST | ( | LoggingDeathTest | , |
FatalIf | ) |
Test that fatal_if only prints the message when the condition is true.
Definition at line 539 of file logging.test.cc.
References fatal_if.
TEST | ( | LoggingDeathTest | , |
FatalLoggerExitHelper | ) |
Test that the fatal logger's exit helper will end execution with error.
Definition at line 498 of file logging.test.cc.
References gem5::Logger::getFatal().
TEST | ( | LoggingDeathTest | , |
gem5Assert | ) |
TEST | ( | LoggingDeathTest | , |
HackLoggerExitHelper | ) |
Test that the hack logger's exit helper will end execution gracefully.
Definition at line 492 of file logging.test.cc.
References gem5::Logger::getHack().
TEST | ( | LoggingDeathTest | , |
InfoLoggerExitHelper | ) |
Test that the info logger's exit helper will end execution gracefully.
Definition at line 486 of file logging.test.cc.
References gem5::Logger::getInfo().
TEST | ( | LoggingDeathTest | , |
Panic | ) |
TEST | ( | LoggingDeathTest | , |
PanicIf | ) |
Test that panic_if only prints the message when the condition is true.
Definition at line 531 of file logging.test.cc.
References panic_if.
TEST | ( | LoggingDeathTest | , |
PanicLoggerExitHelper | ) |
Test that the panic logger's exit helper will end execution with error.
Definition at line 504 of file logging.test.cc.
References gem5::Logger::getPanic().
TEST | ( | LoggingDeathTest | , |
WarnLoggerExitHelper | ) |
Test that the warn logger's exit helper will end execution gracefully.
Definition at line 480 of file logging.test.cc.
References gem5::Logger::getWarn().
TEST_F | ( | LoggingFixture | , |
BaseMessage | ) |
Test macro base_message.
Definition at line 250 of file logging.test.cc.
References base_message, and gem5::gtestLogOutput.
TEST_F | ( | LoggingFixture | , |
BaseMessageOnce | ) |
Test that base_message_once only prints the message once in a loop.
Definition at line 281 of file logging.test.cc.
References base_message_once, gem5::gtestLogOutput, and gem5::ArmISA::i.
TEST_F | ( | LoggingFixture | , |
BasicPrint | ) |
Test the most basic print.
Definition at line 50 of file logging.test.cc.
References gem5::gtestLogOutput, and gem5::Logger::print().
TEST_F | ( | LoggingFixture | , |
DisabledPrint | ) |
Test that no message is shown when printing with a disabled logger.
Definition at line 143 of file logging.test.cc.
References gem5::statistics::enabled(), gem5::gtestLogOutput, and gem5::Logger::Logger().
TEST_F | ( | LoggingFixture | , |
FatalLoggerPrint | ) |
Test printing with the fatal logger, enabled and disabled.
Definition at line 215 of file logging.test.cc.
References gem5::Logger::FATAL, gem5::Logger::getFatal(), gem5::gtestLogOutput, gem5::Logger::NUM_LOG_LEVELS, gem5::Logger::PANIC, gem5::Logger::print(), and gem5::Logger::setLevel().
TEST_F | ( | LoggingFixture | , |
Hack | ) |
Test macro hack.
Definition at line 360 of file logging.test.cc.
References gem5::gtestLogOutput, and hack.
TEST_F | ( | LoggingFixture | , |
HackLoggerPrint | ) |
Test printing with the hack logger, enabled and disabled.
Definition at line 197 of file logging.test.cc.
References gem5::Logger::getHack(), gem5::gtestLogOutput, gem5::Logger::HACK, gem5::Logger::NUM_LOG_LEVELS, gem5::Logger::PANIC, gem5::Logger::print(), and gem5::Logger::setLevel().
TEST_F | ( | LoggingFixture | , |
HackOnce | ) |
Test that hack_once only prints the message once in a loop.
Definition at line 421 of file logging.test.cc.
References gem5::gtestLogOutput, hack_once, and gem5::ArmISA::i.
TEST_F | ( | LoggingFixture | , |
InfoLoggerPrint | ) |
Test printing with the info logger, enabled and disabled.
Definition at line 179 of file logging.test.cc.
References gem5::Logger::getInfo(), gem5::gtestLogOutput, gem5::Logger::INFO, gem5::Logger::NUM_LOG_LEVELS, gem5::Logger::PANIC, gem5::Logger::print(), and gem5::Logger::setLevel().
TEST_F | ( | LoggingFixture | , |
Inform | ) |
Test macro inform.
Definition at line 329 of file logging.test.cc.
References gem5::gtestLogOutput, and inform.
TEST_F | ( | LoggingFixture | , |
InformOnce | ) |
Test that inform_once only prints the message once in a loop.
Definition at line 406 of file logging.test.cc.
References gem5::gtestLogOutput, gem5::ArmISA::i, and inform_once.
TEST_F | ( | LoggingFixture | , |
PanicLoggerPrint | ) |
Test printing with the panic logger, which cannot be disabled.
Definition at line 236 of file logging.test.cc.
References gem5::Logger::getPanic(), gem5::gtestLogOutput, gem5::Logger::NUM_LOG_LEVELS, gem5::Logger::PANIC, gem5::Logger::print(), and gem5::Logger::setLevel().
TEST_F | ( | LoggingFixture | , |
VariadicCharMissingPrint | ) |
Test the variadic-arg print for chars with arguments missing.
Definition at line 111 of file logging.test.cc.
References gem5::gtestLogOutput, and gem5::Logger::print().
TEST_F | ( | LoggingFixture | , |
VariadicCharPrint | ) |
Test the variadic-arg print for chars.
Definition at line 78 of file logging.test.cc.
References gem5::gtestLogOutput, and gem5::Logger::print().
TEST_F | ( | LoggingFixture | , |
VariadicStringMissingPrint | ) |
Test the variadic-arg print for strings with arguments missing.
Definition at line 127 of file logging.test.cc.
References gem5::gtestLogOutput, and gem5::Logger::print().
TEST_F | ( | LoggingFixture | , |
VariadicStringPrint | ) |
Test the variadic-arg print for strings.
Definition at line 95 of file logging.test.cc.
References gem5::gtestLogOutput, and gem5::Logger::print().
TEST_F | ( | LoggingFixture | , |
Warn | ) |
Test macro warn.
Definition at line 298 of file logging.test.cc.
References gem5::gtestLogOutput, and warn.
TEST_F | ( | LoggingFixture | , |
WarnIf | ) |
Test that warn_if only prints the message when the condition is true.
Definition at line 436 of file logging.test.cc.
References gem5::gtestLogOutput, and warn_if.
TEST_F | ( | LoggingFixture | , |
WarnIfOnce | ) |
Test that warn_if_once only prints the message once in a loop.
Definition at line 449 of file logging.test.cc.
References gem5::gtestLogOutput, gem5::ArmISA::i, and warn_if_once.
TEST_F | ( | LoggingFixture | , |
WarnLoggerPrint | ) |
Test printing with the warn logger, enabled and disabled.
Definition at line 161 of file logging.test.cc.
References gem5::Logger::getWarn(), gem5::gtestLogOutput, gem5::Logger::NUM_LOG_LEVELS, gem5::Logger::PANIC, gem5::Logger::print(), gem5::Logger::setLevel(), and gem5::Logger::WARN.
TEST_F | ( | LoggingFixture | , |
WarnOnce | ) |
Test that warn_once only prints the message once in a loop.
Definition at line 391 of file logging.test.cc.
References gem5::gtestLogOutput, gem5::ArmISA::i, and warn_once.