Gabriel B. has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/67455?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: tests: Make the GTestException type accessible to unit
tests
......................................................................
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 <bbr...@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
---
M src/base/gtest/logging.hh
M src/base/gtest/logging_mock.cc
2 files changed, 22 insertions(+), 8 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks
good to me, approved
kokoro: Regressions pass
Bobby Bruce: Looks good to me, approved
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: 3
Gerrit-Owner: Gabriel B. <gabriel.bus...@arteris.com>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Gabriel B. <gabriel.bus...@arteris.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org