[Libreoffice-commits] cppunit.git: include/cppunit

2023-05-09 Thread Libreoffice Gerrit user
 include/cppunit/TestAssert.h |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e2b0721c33d0df57c6a596b18ae98644575c51f9
Author: Stephan Bergmann 
AuthorDate: Tue Feb 21 11:10:00 2023 +0100
Commit: Markus Mohrhard 
CommitDate: Tue May 9 20:00:18 2023 +0200

Don't mis-apply GCC < 4.6 workaround for Clang

...which happens to define __GNUC__=4, __GNUC_MINOR__=2.  (See also


"external/cppunit: Don't mis-apply GCC < 4.6 workaround for Clang".  This 
change
requires  "Use snprintf
instead of sprintf" to avoid deprecation warnings on macOS, which had 
originally
been hidden by the mis-applied #pragma.)

Change-Id: I4fcb38a79766238862795ba4019638862e65b041
Reviewed-on: https://gerrit.libreoffice.org/c/cppunit/+/147384
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/include/cppunit/TestAssert.h b/include/cppunit/TestAssert.h
index 19a8ae5..de97f21 100644
--- a/include/cppunit/TestAssert.h
+++ b/include/cppunit/TestAssert.h
@@ -11,7 +11,8 @@
 
 // Work around "passing 'T' chooses 'int' over 'unsigned int'" warnings when T
 // is an enum type:
-#if defined __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6))
+#if defined __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 
6)) \
+&& !defined __clang__
 #pragma GCC system_header
 #endif
 


[Libreoffice-commits] cppunit.git: include/cppunit

2023-05-09 Thread Libreoffice Gerrit user
 include/cppunit/TestAssert.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5f9aab1993016720db1d7008ed190b0a96293190
Author: Stephan Bergmann 
AuthorDate: Tue Feb 21 10:59:04 2023 +0100
Commit: Markus Mohrhard 
CommitDate: Tue May 9 19:59:41 2023 +0200

Use snprintf instead of sprintf

See


"external/cppunit: Use snprintf instead of sprintf" for how sprintf would 
have
caused deprecation warnings on macOS.

(For MSVC, keep using sprintf_s.  According to

:
"Beginning with the UCRT in Visual Studio 2015 and Windows 10, snprintf is 
no
longer identical to _snprintf.  The snprintf function behavior is now C99
standard conformant."  So for older versions, snprintf would potentially not
store a terminating NUL, like _snprintf but unlike sprintf_s.)

Change-Id: Ibf8b228cd1dd57428ecf85ed10e0793b78ae90c9
Reviewed-on: https://gerrit.libreoffice.org/c/cppunit/+/147383
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/include/cppunit/TestAssert.h b/include/cppunit/TestAssert.h
index 521a4e4..19a8ae5 100644
--- a/include/cppunit/TestAssert.h
+++ b/include/cppunit/TestAssert.h
@@ -112,7 +112,7 @@ struct assertion_traits
 #ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to 
avoid warning.
sprintf_s(buffer, sizeof(buffer), "%.*g", precision, x); 
 #else  
-   sprintf(buffer, "%.*g", precision, x); 
+   snprintf(buffer, sizeof(buffer), "%.*g", precision, x); 
 #endif
return buffer;
 }


[Libreoffice-commits] cppunit.git: include/cppunit

2019-02-14 Thread Libreoffice Gerrit user
 include/cppunit/TestAssert.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 51efd6f2184405dea29265ea0dd25c71b348404a
Author: Tobias Groll 
AuthorDate: Thu Jan 10 17:03:47 2019 +0100
Commit: Markus Mohrhard 
CommitDate: Thu Feb 14 22:40:58 2019 +0800

Added some brackets to make it more clear for the compile which things 
belongs to the if body

diff --git a/include/cppunit/TestAssert.h b/include/cppunit/TestAssert.h
index 1e17868..521a4e4 100644
--- a/include/cppunit/TestAssert.h
+++ b/include/cppunit/TestAssert.h
@@ -551,7 +551,7 @@ void assertGreaterEqual( const T& expected,
   }   \
   \
   if ( cpputCorrectExceptionThrown_ ) \
- break;   \
+   { break; }\
   \
   CPPUNIT_NS::Asserter::fail( cpputMsg_,  \
   CPPUNIT_SOURCELINE() ); \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] cppunit.git: include/cppunit

2019-02-13 Thread Libreoffice Gerrit user
 include/cppunit/Asserter.h |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 3788fccdd12ea1e3240d79e85d9146f6c264c6ec
Author: Stephan Bergmann 
AuthorDate: Fri Feb 1 13:37:59 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 13 10:28:02 2019 +0100

Unconditionally use C++11 [[noreturn]]

This helps avoid issues like 
 "Avoid
-Werror,-Wimplicit-fallthrough with clang-cl ...where CPPUNIT_FAIL is 
marked as
noreturn only for __GNUC__".

Change-Id: Idb33af7375f103f2dd7a7b4c3dbf20ce731b17ad
Reviewed-on: https://gerrit.libreoffice.org/67247
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/include/cppunit/Asserter.h b/include/cppunit/Asserter.h
index 3321b87..dd39ead 100644
--- a/include/cppunit/Asserter.h
+++ b/include/cppunit/Asserter.h
@@ -43,23 +43,17 @@ class Message;
  * \endcode
  */
 
-#if defined __GNUC__
-#   define NORETURN __attribute__((noreturn))
-#else
-#   define NORETURN
-#endif
-
 struct Asserter
 {
   /*! \brief Throws a Exception with the specified message and location.
*/
-  NORETURN static void CPPUNIT_API fail( const Message , 
+  [[noreturn]] static void CPPUNIT_API fail( const Message , 
 const SourceLine  = SourceLine() );
 
   /*! \brief Throws a Exception with the specified message and location.
* \deprecated Use fail( Message, SourceLine ) instead.
*/
-  NORETURN static void CPPUNIT_API fail( std::string message, 
+  [[noreturn]] static void CPPUNIT_API fail( std::string message, 
 const SourceLine  = SourceLine() );
 
   /*! \brief Throws a Exception with the specified message and location.
@@ -165,7 +159,7 @@ struct Asserter
*  what are the differences between the expected 
and actual value.
* \param shortDescription Short description for the failure message.
*/
-  NORETURN static void CPPUNIT_API failNotEqual( std::string expected, 
+  [[noreturn]] static void CPPUNIT_API failNotEqual( std::string expected, 
 std::string actual, 
 const SourceLine ,
 const AdditionalMessage 
 = AdditionalMessage(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] cppunit.git: include/cppunit

2018-09-26 Thread Libreoffice Gerrit user
 include/cppunit/extensions/TestSuiteBuilderContext.h |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 4f5cd3b486afb9c7be1903252b4ae3787137a454
Author: Stephan Bergmann 
AuthorDate: Tue Aug 7 16:24:49 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 26 16:49:15 2018 +0200

Avoid GCC 9 -Wdeprecated-copy

...when an implicitly-defined copy function is used that may in a future C++
standard be defined as deleted because of the user-declared destructor.  
Just
declare all the four copy/move functions as defaulted for a consistent
interface.

(Originally addressed with LibreOffice commit
 "external/cppunit: silence
-Werror=deprecated-copy (GCC trunk towards GCC 9)".)

Change-Id: Ie38ac3a613e6fbc2e4045cb5b14c3f6d167c79c5
Reviewed-on: https://gerrit.libreoffice.org/58690
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/include/cppunit/extensions/TestSuiteBuilderContext.h 
b/include/cppunit/extensions/TestSuiteBuilderContext.h
index 72bfa70..12d157e 100644
--- a/include/cppunit/extensions/TestSuiteBuilderContext.h
+++ b/include/cppunit/extensions/TestSuiteBuilderContext.h
@@ -40,6 +40,11 @@ public:
 
   virtual ~TestSuiteBuilderContextBase();
 
+  TestSuiteBuilderContextBase(TestSuiteBuilderContextBase const &) = default;
+  TestSuiteBuilderContextBase(TestSuiteBuilderContextBase &&) = default;
+  TestSuiteBuilderContextBase & operator =(TestSuiteBuilderContextBase const 
&) = default;
+  TestSuiteBuilderContextBase & operator =(TestSuiteBuilderContextBase &&) = 
default;
+
   /*! \brief Adds a test to the fixture suite.
*
* \param test Test to add to the fixture suite. Must not be \c NULL.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] cppunit.git: include/cppunit include/msvc6 src/cppunit

2018-04-02 Thread Markus Mohrhard
 include/cppunit/plugin/TestPlugIn.h|2 ++
 include/msvc6/testrunner/TestPlugInInterface.h |2 ++
 src/cppunit/Win32DynamicLibraryManager.cpp |2 ++
 3 files changed, 6 insertions(+)

New commits:
commit 5ee5394ccec1e9fa07f2a84d73209472c8a1daab
Author: Markus Mohrhard 
Date:   Mon Apr 2 23:17:19 2018 +0200

tdf#116653, avoid NOMINMAX redefinition warnings with mingw

diff --git a/include/cppunit/plugin/TestPlugIn.h 
b/include/cppunit/plugin/TestPlugIn.h
index 52b5b35..4c57093 100644
--- a/include/cppunit/plugin/TestPlugIn.h
+++ b/include/cppunit/plugin/TestPlugIn.h
@@ -146,7 +146,9 @@ typedef CppUnitTestPlugIn *(*TestPlugInSignature)();
 #define NOUSER
 #define NOKERNEL
 #define NOSOUND
+#ifndef NOMINMAX
 #define NOMINMAX
+#endif
 #define BLENDFUNCTION void// for mingw & gcc
 #include 
 #endif
diff --git a/include/msvc6/testrunner/TestPlugInInterface.h 
b/include/msvc6/testrunner/TestPlugInInterface.h
index 7b35a08..79c128d 100644
--- a/include/msvc6/testrunner/TestPlugInInterface.h
+++ b/include/msvc6/testrunner/TestPlugInInterface.h
@@ -10,7 +10,9 @@
 #define NOUSER
 #define NOKERNEL
 #define NOSOUND
+#ifndef NOMINMAX
 #define NOMINMAX
+#endif
 #include 
 #endif
 
diff --git a/src/cppunit/Win32DynamicLibraryManager.cpp 
b/src/cppunit/Win32DynamicLibraryManager.cpp
index acadf46..5dac4fa 100644
--- a/src/cppunit/Win32DynamicLibraryManager.cpp
+++ b/src/cppunit/Win32DynamicLibraryManager.cpp
@@ -8,7 +8,9 @@
 #define NOUSER
 #define NOKERNEL
 #define NOSOUND
+#ifndef NOMINMAX
 #define NOMINMAX
+#endif
 #define BLENDFUNCTION void// for mingw & gcc  
 #include 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] cppunit.git: include/cppunit

2017-07-20 Thread Stephan Bergmann
 include/cppunit/tools/StringHelper.h |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 85d24152f81bfcd463356330f1cc6257f485535f
Author: Stephan Bergmann 
Date:   Tue Jul 18 15:09:18 2017 +0200

Report (un)signed char values numerically

...instead of as characters, as those values often represent numerical 
values
(e.g., sal_uInt8 aka unsigned char in LibreOffice), and often even have 
values
outside the printing ASCII range

Change-Id: I72727e98f5af616f6b0c03c57fc1119c0c11c1fc
Reviewed-on: https://gerrit.libreoffice.org/40138
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/include/cppunit/tools/StringHelper.h 
b/include/cppunit/tools/StringHelper.h
index 3301045..3b7a38e 100644
--- a/include/cppunit/tools/StringHelper.h
+++ b/include/cppunit/tools/StringHelper.h
@@ -36,6 +36,16 @@ typename std::enable_if::type toString(cons
 return ost.str();
 }
 
+template<> inline std::string toString(const signed char& x)
+{
+return toString(static_cast(x));
+}
+
+template<> inline std::string toString(const unsigned char& x)
+{
+return toString(static_cast(x));
+}
+
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] cppunit.git: include/cppunit NEWS src/cppunit

2017-04-12 Thread Markus Mohrhard
 NEWS  |2 +
 include/cppunit/config/SelectDllLoader.h  |7 
 src/cppunit/BeOsDynamicLibraryManager.cpp |   49 --
 src/cppunit/Makefile.am   |1 
 src/cppunit/cppunit.vcxproj   |1 
 src/cppunit/cppunit_dll.vcxproj   |1 
 6 files changed, 2 insertions(+), 59 deletions(-)

New commits:
commit de5eab33cb30f15f85ac8f197bd571b7695566a6
Author: Markus Mohrhard 
Date:   Thu Apr 13 04:08:37 2017 +0200

remove BeOS special support

diff --git a/NEWS b/NEWS
index b1e0759..f8ef782 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,8 @@
 
   - msvc6 plugin
 
+  - BeOS support
+
   New in CppUnit 1.13.2:
   -
 
diff --git a/include/cppunit/config/SelectDllLoader.h 
b/include/cppunit/config/SelectDllLoader.h
index dc1c011..9f8c0d6 100644
--- a/include/cppunit/config/SelectDllLoader.h
+++ b/include/cppunit/config/SelectDllLoader.h
@@ -15,9 +15,6 @@
  * CPPUNIT_HAVE_WIN32_DLL_LOADER
  * If defined, Win32 implementation of DynamicLibraryManager will be used.
  * 
- * CPPUNIT_HAVE_BEOS_DLL_LOADER
- * If defined, BeOs implementation of DynamicLibraryManager will be used.
- * 
  * CPPUNIT_HAVE_UNIX_DLL_LOADER
  * If defined, Unix implementation (dlfcn.h) of DynamicLibraryManager will be 
used.
  */
@@ -50,10 +47,6 @@
 #undef CPPUNIT_PLUGIN_EXPORT
 #define CPPUNIT_PLUGIN_EXPORT extern "C" __declspec(dllexport)
 
-// Is BeOS platform ?
-#elif defined(__BEOS__)
-#define CPPUNIT_HAVE_BEOS_DLL_LOADER 1
-
 // Is Unix platform and have shl_load() (hp-ux)
 #elif defined(CPPUNIT_HAVE_SHL_LOAD)
 #define CPPUNIT_HAVE_UNIX_SHL_LOADER 1
diff --git a/src/cppunit/BeOsDynamicLibraryManager.cpp 
b/src/cppunit/BeOsDynamicLibraryManager.cpp
deleted file mode 100644
index b8568be..000
--- a/src/cppunit/BeOsDynamicLibraryManager.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#include 
-
-#if defined(CPPUNIT_HAVE_BEOS_DLL_LOADER)
-#include 
-
-#include 
-
-
-CPPUNIT_NS_BEGIN
-
-
-DynamicLibraryManager::LibraryHandle 
-DynamicLibraryManager::doLoadLibrary( const std::string  )
-{
-  return (LibraryHandle)::load_add_on( libraryName.c_str() );
-}
-
-
-void 
-DynamicLibraryManager::doReleaseLibrary()
-{
-  ::unload_add_on( (image_id)m_libraryHandle );
-}
-
-
-DynamicLibraryManager::Symbol 
-DynamicLibraryManager::doFindSymbol( const std::string  )
-{
-  void *symbolPointer;
-  if ( ::get_image_symbol( (image_id)m_libraryHandle, 
-   symbol.c_str(), 
-   B_SYMBOL_TYPE_TEXT, 
-) == B_OK )
-return symnolPointer;
-  return NULL;
-}
-
-
-std::string 
-DynamicLibraryManager::getLastErrorDetail() const
-{
-  return "";
-}
-
-
-CPPUNIT_NS_END
-
-
-#endif // defined(CPPUNIT_HAVE_BEOS_DLL_LOADER)
diff --git a/src/cppunit/Makefile.am b/src/cppunit/Makefile.am
index 7134bad..bb67a8a 100644
--- a/src/cppunit/Makefile.am
+++ b/src/cppunit/Makefile.am
@@ -10,7 +10,6 @@ lib_LTLIBRARIES = libcppunit.la
 libcppunit_la_SOURCES = \
   AdditionalMessage.cpp \
   Asserter.cpp \
-  BeOsDynamicLibraryManager.cpp \
   BriefTestProgressListener.cpp \
   CompilerOutputter.cpp \
   DefaultProtector.h \
diff --git a/src/cppunit/cppunit.vcxproj b/src/cppunit/cppunit.vcxproj
index 7b7b270..43c63a0 100644
--- a/src/cppunit/cppunit.vcxproj
+++ b/src/cppunit/cppunit.vcxproj
@@ -299,7 +299,6 @@
 
 
 
-
 
 
 
diff --git a/src/cppunit/cppunit_dll.vcxproj b/src/cppunit/cppunit_dll.vcxproj
index 71ef783..043e977 100644
--- a/src/cppunit/cppunit_dll.vcxproj
+++ b/src/cppunit/cppunit_dll.vcxproj
@@ -309,7 +309,6 @@ copy "$(TargetDir)$(TargetName).lib" 
..\..\lib\$(TargetName).lib
 
 
 
-
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] cppunit.git: include/cppunit

2016-12-14 Thread Markus Mohrhard
 include/cppunit/TestAssert.h |   32 ++--
 1 file changed, 14 insertions(+), 18 deletions(-)

New commits:
commit 9e22a4f7c7794ab1cbd808058c13356f38ed632a
Author: Markus Mohrhard 
Date:   Wed Dec 14 17:23:38 2016 +0100

simpler implementation for the enum class work around

diff --git a/include/cppunit/TestAssert.h b/include/cppunit/TestAssert.h
index 89f9209..d9f7299 100644
--- a/include/cppunit/TestAssert.h
+++ b/include/cppunit/TestAssert.h
@@ -23,29 +23,25 @@ namespace impl {
 
 // work around to handle C++11 enum class correctly. We need an own conversion 
to std::string
 // as there is no implicit coversion to int for enum class.
-template
-struct toString
+
+template
+typename std::enable_if::value, std::string>::type 
toStringImpl(const T& x)
 {
-static std::string toStringImpl(const T& x)
-{
-OStringStream ost;
-ost << x;
+OStringStream ost;
+ost << x;
 
-return ost.str();
-}
-};
+return ost.str();
+}
 
 template
-struct toString::type>
+typename std::enable_if::type 
toStringImpl(const T& x)
 {
-static std::string toStringImpl(const T& x)
-{
-OStringStream ost;
-ost << static_cast::type>(x);
+OStringStream ost;
+ost << static_cast::type>(x);
+
+return ost.str();
+}
 
-return ost.str();
-}
-};
 
 }
 
@@ -102,7 +98,7 @@ struct assertion_traits
 
 static std::string toString( const T& x )
 {
-return impl::toString::toStringImpl(x);
+return impl::toStringImpl(x);
 }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] cppunit.git: include/cppunit

2015-11-08 Thread Markus Mohrhard
 include/cppunit/portability/SmartPtr.h |4 
 1 file changed, 4 insertions(+)

New commits:
commit 292026e36ce5b9ebdad86e99304be2ded8c199d8
Author: Markus Mohrhard 
Date:   Sun Nov 8 07:26:23 2015 -0800

fix --disable-optional-features build

Use std::auto_ptr in C++03 mode.

diff --git a/include/cppunit/portability/SmartPtr.h 
b/include/cppunit/portability/SmartPtr.h
index 76e2183..5fa9c9d 100644
--- a/include/cppunit/portability/SmartPtr.h
+++ b/include/cppunit/portability/SmartPtr.h
@@ -1,6 +1,10 @@
 #ifndef CPPUNIT_PORTABILITY_CPPUNITSMARTPTR_H
 #define CPPUNIT_PORTABILITY_CPPUNITSMARTPTR_H
 
+#if HAVE_CXX11
 #define CppUnitSmartPtr std::unique_ptr
+#else
+#define CppUnitSmartPtr std::auto_ptr
+#endif
 
 #endif // CPPUNIT_PORTABILITY_CPPUNITDEQUE_H
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] cppunit.git: include/cppunit

2015-08-17 Thread Markus Mohrhard
 include/cppunit/TestCaller.h |9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 69ea3cbf1ec9ff8c5159f73d0ce71087f7727792
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Tue Aug 18 03:58:24 2015 +0200

remove commented out code

The code has been commented out for a long time and is not related to a
missing fix.

diff --git a/include/cppunit/TestCaller.h b/include/cppunit/TestCaller.h
index dc4d82e..aba2c27 100644
--- a/include/cppunit/TestCaller.h
+++ b/include/cppunit/TestCaller.h
@@ -162,14 +162,7 @@ public:
 
   void runTest()
   { 
-//   try {
-   (m_fixture-*m_test)();
-//   }
-//   catch ( ExpectedException  ) {
-// return;
-//   }
-
-// ExpectedExceptionTraitsExpectedException::expectedException();
+  (m_fixture-*m_test)();
   }  
 
   void setUp()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] cppunit.git: include/cppunit

2014-07-06 Thread Caolán McNamara
 include/cppunit/Asserter.h |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 059fcd2878071616cedb5116a0b2f75b5edbdbe0
Author: Caolán McNamara caol...@redhat.com
Date:   Sun Jul 6 15:34:41 2014 +0100

mark the fails as no-return

that might help clang scan-build understand that execution won't continue 
after
they fail

diff --git a/include/cppunit/Asserter.h b/include/cppunit/Asserter.h
index 94dadaa..ad981b5 100644
--- a/include/cppunit/Asserter.h
+++ b/include/cppunit/Asserter.h
@@ -42,17 +42,24 @@ class Message;
  *CPPUNIT_SOURCELINE() )
  * \endcode
  */
+
+#if defined __GNUC__
+#   define NORETURN __attribute__((noreturn))
+#else
+#   define NORETURN
+#endif
+
 struct Asserter
 {
   /*! \brief Throws a Exception with the specified message and location.
*/
-  static void CPPUNIT_API fail( const Message message, 
+  NORETURN static void CPPUNIT_API fail( const Message message, 
 const SourceLine sourceLine = SourceLine() );
 
   /*! \brief Throws a Exception with the specified message and location.
* \deprecated Use fail( Message, SourceLine ) instead.
*/
-  static void CPPUNIT_API fail( std::string message, 
+  NORETURN static void CPPUNIT_API fail( std::string message, 
 const SourceLine sourceLine = SourceLine() );
 
   /*! \brief Throws a Exception with the specified message and location.
@@ -111,7 +118,7 @@ struct Asserter
*  what are the differences between the expected 
and actual value.
* \param shortDescription Short description for the failure message.
*/
-  static void CPPUNIT_API failNotEqual( std::string expected, 
+  NORETURN static void CPPUNIT_API failNotEqual( std::string expected, 
 std::string actual, 
 const SourceLine sourceLine,
 const AdditionalMessage 
additionalMessage = AdditionalMessage(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits