From a6810e123a163f1c81df3b6eea2a896f5340c9e1 Mon Sep 17 00:00:00 2001 From: daqingshu <12083415+daqingshu@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:47:33 +0800 Subject: [PATCH 1/5] Update Error.h compatible cxx 17 --- tests/3rdparty/testngpp/include/testngpp/internal/Error.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/3rdparty/testngpp/include/testngpp/internal/Error.h b/tests/3rdparty/testngpp/include/testngpp/internal/Error.h index 0770c015..f549b544 100644 --- a/tests/3rdparty/testngpp/include/testngpp/internal/Error.h +++ b/tests/3rdparty/testngpp/include/testngpp/internal/Error.h @@ -33,7 +33,7 @@ struct Error : public std::exception {} ~Error() TESTNGPP_THROW() {} - const char* what() const TESTNGPP_THROW() + const char* what() const throw() { return reason.c_str(); } From 4762966baa92dbaf14588564e3e84f04de50984c Mon Sep 17 00:00:00 2001 From: daqingshu <12083415+daqingshu@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:48:12 +0800 Subject: [PATCH 2/5] Update Exception.h todo --- tests/3rdparty/testngpp/include/testngpp/internal/Exception.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/3rdparty/testngpp/include/testngpp/internal/Exception.h b/tests/3rdparty/testngpp/include/testngpp/internal/Exception.h index b7fd69a7..d647d20a 100644 --- a/tests/3rdparty/testngpp/include/testngpp/internal/Exception.h +++ b/tests/3rdparty/testngpp/include/testngpp/internal/Exception.h @@ -34,7 +34,7 @@ struct Exception: public std::exception const std::string& getFileName() const; unsigned int getLineOfFile() const; - const char* what() const TESTNGPP_THROW(); + const char* what() const throw(); private: std::string fileName; From a0b58befbd210cdb4d05a2069538c87af75e87d1 Mon Sep 17 00:00:00 2001 From: daqingshu <12083415+daqingshu@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:48:54 +0800 Subject: [PATCH 3/5] Update testngpp.h --- tests/3rdparty/testngpp/include/testngpp/testngpp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/3rdparty/testngpp/include/testngpp/testngpp.h b/tests/3rdparty/testngpp/include/testngpp/testngpp.h index 158dc174..7fdac371 100644 --- a/tests/3rdparty/testngpp/include/testngpp/testngpp.h +++ b/tests/3rdparty/testngpp/include/testngpp/testngpp.h @@ -40,7 +40,7 @@ #ifdef _MSC_VER #define TESTNGPP_THROW(...) #else -#define TESTNGPP_THROW(...) throw(__VA_ARGS__) +#define TESTNGPP_THROW(...) #endif #endif From e1bb6c935766c77332f015026d3dc2e1c2e957c3 Mon Sep 17 00:00:00 2001 From: daqingshu <12083415+daqingshu@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:49:33 +0800 Subject: [PATCH 4/5] Update Exception.cpp --- tests/3rdparty/testngpp/src/except/Exception.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/3rdparty/testngpp/src/except/Exception.cpp b/tests/3rdparty/testngpp/src/except/Exception.cpp index 1d5f2218..87216a19 100644 --- a/tests/3rdparty/testngpp/src/except/Exception.cpp +++ b/tests/3rdparty/testngpp/src/except/Exception.cpp @@ -40,7 +40,7 @@ unsigned int Exception::getLineOfFile() const } ////////////////////////////////////////////////////////// -const char* Exception::what() const TESTNGPP_THROW() +const char* Exception::what() const throw() { return errMsg.c_str(); } From 68ab2a0b2b9fea9b5186013a20cc6c59d057315a Mon Sep 17 00:00:00 2001 From: daqingshu <12083415+daqingshu@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:50:27 +0800 Subject: [PATCH 5/5] Update debug_new.cpp --- tests/3rdparty/testngpp/src/mem_checker/debug_new.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/3rdparty/testngpp/src/mem_checker/debug_new.cpp b/tests/3rdparty/testngpp/src/mem_checker/debug_new.cpp index 6c7dd0de..acfeb226 100644 --- a/tests/3rdparty/testngpp/src/mem_checker/debug_new.cpp +++ b/tests/3rdparty/testngpp/src/mem_checker/debug_new.cpp @@ -880,12 +880,12 @@ void* operator new[](size_t size, const char* file, int line) #endif } -void* operator new(size_t size) throw(std::bad_alloc) +void* operator new(size_t size) { return operator new(size, (char*)_DEBUG_NEW_CALLER_ADDRESS, 0); } -void* operator new[](size_t size) throw(std::bad_alloc) +void* operator new[](size_t size) { return operator new[](size, (char*)_DEBUG_NEW_CALLER_ADDRESS, 0); }