Skip to content

Commit

Permalink
Release 1.33.2
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed Aug 28, 2018
1 parent 6b059e3 commit d68cc22
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 34 deletions.
34 changes: 17 additions & 17 deletions include/lest/lest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <cmath>
#include <cstddef>

#define lest_VERSION "1.33.1"
#define lest_VERSION "1.33.2"

#ifndef lest_FEATURE_AUTO_REGISTER
# define lest_FEATURE_AUTO_REGISTER 0
Expand All @@ -49,22 +49,22 @@
# define lest_FEATURE_REGEX_SEARCH 0
#endif

#ifndef lest_FEATURE_TIME_PRECISION
#define lest_FEATURE_TIME_PRECISION 0
#ifndef lest_FEATURE_TIME_PRECISION
# define lest_FEATURE_TIME_PRECISION 0
#endif

#ifndef lest_FEATURE_WSTRING
#define lest_FEATURE_WSTRING 1
#ifndef lest_FEATURE_WSTRING
# define lest_FEATURE_WSTRING 1
#endif

#ifdef lest_FEATURE_RTTI
# define lest__cpp_rtti lest_FEATURE_RTTI
#ifdef lest_FEATURE_RTTI
# define lest__cpp_rtti lest_FEATURE_RTTI
#elif defined(__cpp_rtti)
# define lest__cpp_rtti __cpp_rtti
# define lest__cpp_rtti __cpp_rtti
#elif defined(__GXX_RTTI) || defined (_CPPRTTI)
# define lest__cpp_rtti 1
# define lest__cpp_rtti 1
#else
# define lest__cpp_rtti 0
# define lest__cpp_rtti 0
#endif

#if lest_FEATURE_REGEX_SEARCH
Expand All @@ -73,26 +73,26 @@

// Compiler warning suppression:

#ifdef __clang__
#if defined (__clang__)
# pragma clang diagnostic ignored "-Waggregate-return"
# pragma clang diagnostic ignored "-Woverloaded-shift-op-parentheses"
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunused-comparison"
#elif defined __GNUC__
#elif defined (__GNUC__)
# pragma GCC diagnostic ignored "-Waggregate-return"
# pragma GCC diagnostic push
#endif

// Suppress shadow and unused-value warning for sections:

#if defined __clang__
#if defined (__clang__)
# define lest_SUPPRESS_WSHADOW _Pragma( "clang diagnostic push" ) \
_Pragma( "clang diagnostic ignored \"-Wshadow\"" )
# define lest_SUPPRESS_WUNUSED _Pragma( "clang diagnostic push" ) \
_Pragma( "clang diagnostic ignored \"-Wunused-value\"" )
# define lest_RESTORE_WARNINGS _Pragma( "clang diagnostic pop" )

#elif defined __GNUC__
#elif defined (__GNUC__)
# define lest_SUPPRESS_WSHADOW _Pragma( "GCC diagnostic push" ) \
_Pragma( "GCC diagnostic ignored \"-Wshadow\"" )
# define lest_SUPPRESS_WUNUSED _Pragma( "GCC diagnostic push" ) \
Expand All @@ -104,7 +104,7 @@
# define lest_RESTORE_WARNINGS /*empty*/
#endif

#ifdef _MSVC_LANG
#if defined ( _MSVC_LANG)
# define lest_CPP17_OR_GREATER_MS ( _MSVC_LANG >= 201703L )
#else
# define lest_CPP17_OR_GREATER_MS 0
Expand Down Expand Up @@ -1437,9 +1437,9 @@ int run( test const (&specification)[N], int argc, char * argv[], std::ostream &

} // namespace lest

#ifdef __clang__
#if defined (__clang__)
# pragma clang diagnostic pop
#elif defined __GNUC__
#elif defined (__GNUC__)
# pragma GCC diagnostic pop
#endif

Expand Down
33 changes: 16 additions & 17 deletions include/lest/lest_cpp03.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <cstdlib>
#include <ctime>

#define lest_VERSION "1.33.1"
#define lest_VERSION "1.33.2"

#ifndef lest_FEATURE_COLOURISE
# define lest_FEATURE_COLOURISE 0
Expand Down Expand Up @@ -71,26 +71,26 @@

// Compiler warning suppression:

#ifdef __clang__
#if defined (__clang__)
# pragma clang diagnostic ignored "-Waggregate-return"
# pragma clang diagnostic ignored "-Woverloaded-shift-op-parentheses"
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdate-time"
#elif defined __GNUC__
#elif defined (__GNUC__)
# pragma GCC diagnostic ignored "-Waggregate-return"
# pragma GCC diagnostic push
#endif

// Suppress shadow and unused-value warning for sections:

#if defined __clang__
#if defined (__clang__)
# define lest_SUPPRESS_WSHADOW _Pragma( "clang diagnostic push" ) \
_Pragma( "clang diagnostic ignored \"-Wshadow\"" )
# define lest_SUPPRESS_WUNUSED _Pragma( "clang diagnostic push" ) \
_Pragma( "clang diagnostic ignored \"-Wunused-value\"" )
# define lest_RESTORE_WARNINGS _Pragma( "clang diagnostic pop" )

#elif defined __GNUC__
#elif defined (__GNUC__)
# define lest_SUPPRESS_WSHADOW _Pragma( "GCC diagnostic push" ) \
_Pragma( "GCC diagnostic ignored \"-Wshadow\"" )
# define lest_SUPPRESS_WUNUSED _Pragma( "GCC diagnostic push" ) \
Expand All @@ -112,13 +112,13 @@

#define lest_COMPILER_VERSION( major, minor, patch ) ( 10 * ( 10 * major + minor ) + patch )

#if defined __clang__
#if defined (__clang__)
# define lest_COMPILER_CLANG_VERSION lest_COMPILER_VERSION( __clang_major__, __clang_minor__, __clang_patchlevel__ )
#else
# define lest_COMPILER_CLANG_VERSION 0
#endif

#if defined __GNUC__
#if defined (__GNUC__)
# define lest_COMPILER_GNUC_VERSION lest_COMPILER_VERSION( __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ )
#else
# define lest_COMPILER_GNUC_VERSION 0
Expand All @@ -139,19 +139,18 @@
#define lest_CPP17_OR_GREATER (__cplusplus >= 201703L || lest_MSVC_LANG >= 201703L )
#define lest_CPP20_OR_GREATER (__cplusplus >= 202000L || lest_MSVC_LANG >= 202000L )


#ifndef __has_cpp_attribute
#define __has_cpp_attribute(name) 0
#ifndef __has_cpp_attribute
# define __has_cpp_attribute(name) 0
#endif

// Check, if unsued attributes are supported, do nothing, if they are not supported:
// Indicate argument as possibly unused, if possible:

#if __has_cpp_attribute(maybe_unused) && lest_CPP17_OR_GREATER
#define lest_MAYBE_UNUSED(ARG) [[maybe_unused]] ARG
#elif defined __GNUC__
#define lest_MAYBE_UNUSED(ARG) ARG __attribute((unused))
# define lest_MAYBE_UNUSED(ARG) [[maybe_unused]] ARG
#elif defined (__GNUC__)
# define lest_MAYBE_UNUSED(ARG) ARG __attribute((unused))
#else
#define lest_MAYBE_UNUSED(ARG) ARG
# define lest_MAYBE_UNUSED(ARG) ARG
#endif

// Presence of language and library features:
Expand Down Expand Up @@ -1483,9 +1482,9 @@ int run( C const & specification, std::ostream & os = std::cout )

} // namespace lest

#ifdef __clang__
#if defined (__clang__)
# pragma clang diagnostic pop
#elif defined __GNUC__
#elif defined (__GNUC__)
# pragma GCC diagnostic pop
#endif

Expand Down

0 comments on commit d68cc22

Please sign in to comment.