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:
committed by
Gabriel B.
parent
3bdbe482c2
commit
c1b1a702f9
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user