tests: Make the GTestException type accessible to unit tests

Change-Id: I654589a3d90377657393d98e75c0697ba0e72c76
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67455
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Gabriel Busnot
2023-01-25 07:28:39 +00:00
committed by Gabriel B.
parent 3bdbe482c2
commit c1b1a702f9
2 changed files with 8 additions and 8 deletions

View File

@@ -32,6 +32,14 @@
namespace gem5
{
// This custom exception type will help prevent fatal exceptions from being
// caught by other code in gem5 and let them escape to the gtest framework.
// Unfortunately that results in a somewhat confusing message about an unknown
// exception being thrown after the panic/fatal message has been printed, but
// there will at least be some indication what went wrong.
struct GTestException
{};
class GTestLogOutput : public std::ostringstream
{
private:

View File

@@ -36,14 +36,6 @@ namespace gem5
namespace {
// This custom exception type will help prevent fatal exceptions from being
// caught by other code in gem5 and let them escape to the gtest framework.
// Unfortunately that results in a somewhat confusing message about an unknown
// exception being thrown after the panic/fatal message has been printed, but
// there will at least be some indication what went wrong.
struct GTestException
{};
class GTestLogger : public Logger
{
public: