mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
Use StringRef UDL for more string literals when expanding macros
* for the name of the listener when registering listener * for the original expression in assertion macros
This commit is contained in:
parent
bf6a15a69a
commit
dcc9fa3f38
@ -23,9 +23,9 @@
|
|||||||
#if !defined(CATCH_CONFIG_DISABLE)
|
#if !defined(CATCH_CONFIG_DISABLE)
|
||||||
|
|
||||||
#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION)
|
#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION)
|
||||||
#define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__
|
#define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__##_catch_sr
|
||||||
#else
|
#else
|
||||||
#define CATCH_INTERNAL_STRINGIFY(...) "Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION"
|
#define CATCH_INTERNAL_STRINGIFY(...) "Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION"_catch_sr
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CATCH_CONFIG_FAST_COMPILE) || defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
#if defined(CATCH_CONFIG_FAST_COMPILE) || defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||||
|
@ -118,7 +118,7 @@ namespace Catch {
|
|||||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||||
namespace { \
|
namespace { \
|
||||||
Catch::ListenerRegistrar<listenerType> INTERNAL_CATCH_UNIQUE_NAME( \
|
Catch::ListenerRegistrar<listenerType> INTERNAL_CATCH_UNIQUE_NAME( \
|
||||||
catch_internal_RegistrarFor )( #listenerType ); \
|
catch_internal_RegistrarFor )( #listenerType##_catch_sr ); \
|
||||||
} \
|
} \
|
||||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user