Gabriel B. has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/67455?usp=email )
Change subject: tests: Make the GTestException type accessible to unit tests
......................................................................
tests: Make the GTestException type accessible to unit tests
Change-Id: I654589a3d90377657393d98e75c0697ba0e72c76
---
M src/base/gtest/logging.hh
M src/base/gtest/logging_mock.cc
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/base/gtest/logging.hh b/src/base/gtest/logging.hh
index 12d4e5a..1d5a39c 100644
--- a/src/base/gtest/logging.hh
+++ b/src/base/gtest/logging.hh
@@ -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:
diff --git a/src/base/gtest/logging_mock.cc b/src/base/gtest/logging_mock.cc
index 101374e..07a20ea 100644
--- a/src/base/gtest/logging_mock.cc
+++ b/src/base/gtest/logging_mock.cc
@@ -36,14 +36,6 @@
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:
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/67455?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I654589a3d90377657393d98e75c0697ba0e72c76
Gerrit-Change-Number: 67455
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriel B. <gabriel.bus...@arteris.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org