|
gem5
v22.1.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. More... | |
| TEST_F (LoggingFixture, VariadicCharPrint) | |
| Test the variadic-arg print for chars. More... | |
| TEST_F (LoggingFixture, VariadicStringPrint) | |
| Test the variadic-arg print for strings. More... | |
| TEST_F (LoggingFixture, VariadicCharMissingPrint) | |
| Test the variadic-arg print for chars with arguments missing. More... | |
| TEST_F (LoggingFixture, VariadicStringMissingPrint) | |
| Test the variadic-arg print for strings with arguments missing. More... | |
| TEST_F (LoggingFixture, DisabledPrint) | |
| Test that no message is shown when printing with a disabled logger. More... | |
| TEST_F (LoggingFixture, WarnLoggerPrint) | |
| Test printing with the warn logger, enabled and disabled. More... | |
| TEST_F (LoggingFixture, InfoLoggerPrint) | |
| Test printing with the info logger, enabled and disabled. More... | |
| TEST_F (LoggingFixture, HackLoggerPrint) | |
| Test printing with the hack logger, enabled and disabled. More... | |
| TEST_F (LoggingFixture, FatalLoggerPrint) | |
| Test printing with the fatal logger, enabled and disabled. More... | |
| TEST_F (LoggingFixture, PanicLoggerPrint) | |
| Test printing with the panic logger, which cannot be disabled. More... | |
| TEST_F (LoggingFixture, BaseMessage) | |
| Test macro base_message. More... | |
| TEST_F (LoggingFixture, BaseMessageOnce) | |
| Test that base_message_once only prints the message once in a loop. More... | |
| TEST_F (LoggingFixture, Warn) | |
| Test macro warn. More... | |
| TEST_F (LoggingFixture, Inform) | |
| Test macro inform. More... | |
| TEST_F (LoggingFixture, Hack) | |
| Test macro hack. More... | |
| TEST_F (LoggingFixture, WarnOnce) | |
| Test that warn_once only prints the message once in a loop. More... | |
| TEST_F (LoggingFixture, InformOnce) | |
| Test that inform_once only prints the message once in a loop. More... | |
| TEST_F (LoggingFixture, HackOnce) | |
| Test that hack_once only prints the message once in a loop. More... | |
| TEST_F (LoggingFixture, WarnIf) | |
| Test that warn_if only prints the message when the condition is true. More... | |
| TEST_F (LoggingFixture, WarnIfOnce) | |
| Test that warn_if_once only prints the message once in a loop. More... | |
| TEST (LoggingDeathTest, EmptyPrefix) | |
| Test that a logger cannot be created with an empty prefix. More... | |
| TEST (LoggingDeathTest, ExitHelper) | |
| Test that the test logger's exit helper will end execution gracefully. More... | |
| TEST (LoggingDeathTest, WarnLoggerExitHelper) | |
| Test that the warn logger's exit helper will end execution gracefully. More... | |
| TEST (LoggingDeathTest, InfoLoggerExitHelper) | |
| Test that the info logger's exit helper will end execution gracefully. More... | |
| TEST (LoggingDeathTest, HackLoggerExitHelper) | |
| Test that the hack logger's exit helper will end execution gracefully. More... | |
| TEST (LoggingDeathTest, FatalLoggerExitHelper) | |
| Test that the fatal logger's exit helper will end execution with error. More... | |
| TEST (LoggingDeathTest, PanicLoggerExitHelper) | |
| Test that the panic logger's exit helper will end execution with error. More... | |
| TEST (LoggingDeathTest, ExitMessage) | |
| Test that exit_message prints a message and exits. More... | |
| TEST (LoggingDeathTest, Panic) | |
| Test macro panic. More... | |
| TEST (LoggingDeathTest, Fatal) | |
| Test macro fatal. More... | |
| TEST (LoggingDeathTest, PanicIf) | |
| Test that panic_if only prints the message when the condition is true. More... | |
| TEST (LoggingDeathTest, FatalIf) | |
| Test that fatal_if only prints the message when the condition is true. More... | |
| TEST (LoggingDeathTest, gem5Assert) | |
| Test macro gem5_assert. More... | |
| 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(), and gem5::gtestLogOutput.
| 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.