catch2/include/internal
Martin Hořeňovský b7b346c3e5
Make warnings in assertions fire for GCC/Clang again
The old code caused warnings to fire under MSVC, and Clang <3.8.
I could not find a GCC version where it worked, but I assume that it
did at some point.

This new code causes all of MSVC, GCC, Clang, in current versions,
to emit signed/unsigned comparison warning in test like this:

```cpp
TEST_CASE() {
    int32_t i = -1;
    uint32_t j = 1;
    REQUIRE(i != j);
}
```

Where previously only MSVC would emit the warning.

Fixes #1880
2020-03-19 09:45:41 +01:00
..
benchmark include <iterator> in catch_stats.hpp 2020-02-24 19:36:34 +01:00
catch_approx.cpp Special case Approx(inf) to better follow user expectations 2019-10-04 13:28:43 +02:00
catch_approx.h Directly set Approx's members in operator() 2018-09-03 10:20:58 +02:00
catch_assertionhandler.cpp Add support for -fno-exceptions (or equivalent) 2018-09-03 21:08:27 +02:00
catch_assertionhandler.h Avoid copying StringRef 2018-07-23 14:04:43 +02:00
catch_assertioninfo.h Actually do what the previous commit claimed to do! 2017-08-09 10:29:05 +01:00
catch_assertionresult.cpp Remove (mostly) unused overloads of StringRef operator + 2019-09-08 21:01:33 +02:00
catch_assertionresult.h Fix pointless type mismatch between StringRef and std::string 2017-11-13 12:49:13 +01:00
catch_capture.hpp Make warnings in assertions fire for GCC/Clang again 2020-03-19 09:45:41 +01:00
catch_capture_matchers.cpp Avoid copying StringRef 2018-07-23 14:04:43 +02:00
catch_capture_matchers.h Add a matcher that checks exception's message 2019-10-13 20:37:07 +02:00
catch_clara.h Sweep out some extra warnings 2017-09-07 17:25:15 +02:00
catch_commandline.cpp Add command line option 'never' to --wait-for-keypress (#1866) 2020-02-15 20:42:57 +01:00
catch_commandline.h Changed all .hpp extensions to .h where there is now a corresponding .cpp 2017-09-07 11:24:33 +01:00
catch_common.cpp Inline SourceLineInfo::empty definition 2019-09-08 18:20:49 +02:00
catch_common.h Inline SourceLineInfo::empty definition 2019-09-08 18:20:49 +02:00
catch_compiler_capabilities.h Make warnings in assertions fire for GCC/Clang again 2020-03-19 09:45:41 +01:00
catch_config.cpp Make CATCH_BREAK_INTO_DEBUGGER be user-configurable 2020-02-01 17:01:50 +01:00
catch_config.hpp Make CATCH_BREAK_INTO_DEBUGGER be user-configurable 2020-02-01 17:01:50 +01:00
catch_console_colour.cpp Some refactorings: 2020-01-25 09:01:04 +01:00
catch_console_colour.h Add a BrightYellow colour, also use it for reconstructed exprs 2018-02-01 14:58:33 +00:00
catch_context.cpp Introduce Catch's own RNG based on the PCG family of RNGs 2019-10-07 19:56:23 +02:00
catch_context.h Suppress false positive from clang-analyzer 2019-10-20 17:27:09 +02:00
catch_debug_console.cpp Add disabling the use of Android's logging at compile time 2019-09-06 12:44:06 +02:00
catch_debug_console.h Split writeToDebugConsole out of main path 2017-08-29 13:51:55 +02:00
catch_debugger.cpp catch_console_colour.cpp - adjust useColourOnPlatform for iOS 2019-12-23 21:26:13 +01:00
catch_debugger.h Specialize CATCH_TRAP() for iOS + thumb instruction set combo 2020-02-15 21:45:09 +01:00
catch_decomposer.cpp Sweep out some extra warnings 2017-09-07 17:25:15 +02:00
catch_decomposer.h Fix stupid (C4800) warning 2019-01-13 19:01:12 +01:00
catch_default_main.hpp Check for Windows instead of WIN32 for wmain entry point 2020-02-03 09:33:42 +01:00
catch_enforce.cpp Introduce stubs for throwing specific exception types 2019-06-14 19:13:50 +02:00
catch_enforce.h Add a test for the internals 2019-08-09 10:50:53 +02:00
catch_enum_values_registry.cpp Some refactorings: 2020-01-25 09:01:04 +01:00
catch_enum_values_registry.h Use StringRefs through the enum registration 2019-09-08 14:14:46 +02:00
catch_errno_guard.cpp Started work on splitting out .cpp files from header files 2017-07-06 22:28:42 +02:00
catch_errno_guard.h Started work on splitting out .cpp files from header files 2017-07-06 22:28:42 +02:00
catch_exception_translator_registry.cpp Don't use exception-related std:: functions with -fno-exceptions 2018-12-18 20:19:39 +01:00
catch_exception_translator_registry.h Refactor: override implies virtual 2018-07-12 14:27:06 +02:00
catch_external_interfaces.h Provide ConsoleReporter declaration with EXTERNAL_INTERFACES 2017-11-14 20:42:58 +01:00
catch_fatal_condition.cpp static constexpr: storage class first 2019-08-06 19:17:16 -05:00
catch_fatal_condition.h Simplify logic selecting between signal handling/SEH/nothing 2018-02-23 14:56:07 +01:00
catch_generators.cpp Add generic generator modifiers 2019-01-31 10:43:15 +01:00
catch_generators.hpp Fix forwarding in SingleValueGenerator and generator creation 2019-12-15 20:50:43 +01:00
catch_generators_generic.hpp Extract FunctionReturnType to catch_meta.hpp 2019-10-28 15:15:13 +01:00
catch_generators_specific.hpp Enable `range` generator for floating point types 2019-10-26 20:52:09 +02:00
catch_impl.hpp Sweep out some extra warnings 2017-09-07 17:25:15 +02:00
catch_interfaces_capture.cpp Sweep out some extra warnings 2017-09-07 17:25:15 +02:00
catch_interfaces_capture.h Various improvements to the benchmarking support 2019-06-06 21:28:56 +02:00
catch_interfaces_config.cpp Small updates to include directives (#1726) 2019-09-08 14:25:23 +02:00
catch_interfaces_config.h Make CATCH_BREAK_INTO_DEBUGGER be user-configurable 2020-02-01 17:01:50 +01:00
catch_interfaces_enum_values_registry.h Use StringRefs through the enum registration 2019-09-08 14:14:46 +02:00
catch_interfaces_exception.cpp Small updates to include directives (#1726) 2019-09-08 14:25:23 +02:00
catch_interfaces_exception.h Rework how warning suppression in macros is done 2019-10-27 21:07:21 +01:00
catch_interfaces_generatortracker.h Redo generator interface 2019-01-31 10:43:06 +01:00
catch_interfaces_registry_hub.cpp Small updates to include directives (#1726) 2019-09-08 14:25:23 +02:00
catch_interfaces_registry_hub.h First commit of STRINGIFY_ENUM 2019-04-04 15:55:46 +01:00
catch_interfaces_reporter.cpp Call listeners before calling reporters 2018-04-07 12:25:03 +02:00
catch_interfaces_reporter.h Fixes #1766: Catch terminates when parsing invalid test name 2019-10-19 21:14:06 +02:00
catch_interfaces_runner.cpp Small updates to include directives (#1726) 2019-09-08 14:25:23 +02:00
catch_interfaces_runner.h Minor cleanup 2017-08-30 15:53:39 +02:00
catch_interfaces_tag_alias_registry.h Split Option<T> and TagAlias definitions away from the main include path 2017-07-27 11:55:30 +02:00
catch_interfaces_testcase.cpp Small updates to include directives (#1726) 2019-09-08 14:25:23 +02:00
catch_interfaces_testcase.h Improve reporting of unmatched filters (#1684) 2019-08-06 20:51:19 +02:00
catch_leak_detector.cpp Catch::LeakDetector: added cleanup call to destructor 2018-10-18 11:47:21 +02:00
catch_leak_detector.h Catch::LeakDetector: added cleanup call to destructor 2018-10-18 11:47:21 +02:00
catch_list.cpp Variables made const-ref. 2020-02-08 14:27:40 +01:00
catch_list.h fix SEGFAULTs 2019-02-08 10:41:23 +01:00
catch_matchers.cpp Sweep out some extra warnings 2017-09-07 17:25:15 +02:00
catch_matchers.h Fix significant bug with storing composed matchers 2020-02-01 21:06:07 +01:00
catch_matchers_exception.cpp Add a matcher that checks exception's message 2019-10-13 20:37:07 +02:00
catch_matchers_exception.hpp Remove superfluous includes in exception matchers 2019-10-13 20:49:36 +02:00
catch_matchers_floating.cpp Cleanup nextafter workaround 2020-02-03 10:05:23 +01:00
catch_matchers_floating.h Add a Relative Comparison matcher for floating point numbers 2019-10-13 11:56:50 +02:00
catch_matchers_generic.cpp Add PredicateMatcher that takes an arbitrary predicate functions 2018-04-04 11:14:19 +02:00
catch_matchers_generic.hpp Fix typos identified by codespell. 2019-04-10 09:42:11 +02:00
catch_matchers_string.cpp Provide a regex matcher against std::string 2017-11-13 15:35:31 +01:00
catch_matchers_string.h Provide a regex matcher against std::string 2017-11-13 15:35:31 +01:00
catch_matchers_vector.h Added a vector approximate matcher 2019-04-20 10:02:17 +02:00
catch_message.cpp Some refactorings: 2020-01-25 09:01:04 +01:00
catch_message.h Add unscoped info functionality 2019-03-06 22:04:35 +01:00
catch_meta.hpp Extract FunctionReturnType to catch_meta.hpp 2019-10-28 15:15:13 +01:00
catch_objc.hpp (Hopefully) Fix Obj-C++ compilation of matchers 2019-08-07 20:35:27 +02:00
catch_objc_arc.hpp Conditionally compile clang pragmas 2012-08-16 18:47:41 +01:00
catch_option.hpp General cleanup 2017-07-27 11:32:01 +02:00
catch_output_redirect.cpp Fix typos identified by codespell. 2019-04-10 09:42:11 +02:00
catch_output_redirect.h Fix output redirection in failing tests (#1525) 2019-03-02 21:18:48 +01:00
catch_platform.h Detect MinGW as Windows platform w/o SEH 2018-04-22 18:46:54 +02:00
catch_polyfills.cpp Add `std::isnan` polyfill, fixing compilation under Embarcadero 2018-11-17 20:52:18 +01:00
catch_polyfills.hpp Add `std::isnan` polyfill, fixing compilation under Embarcadero 2018-11-17 20:52:18 +01:00
catch_preprocessor.hpp TemplateTests: fix compilation with ICC 2019-10-18 12:35:09 +02:00
catch_random_number_generator.cpp Introduce Catch's own RNG based on the PCG family of RNGs 2019-10-07 19:56:23 +02:00
catch_random_number_generator.h Add parenthesis to prevent macro expansions of min/max 2019-10-17 16:40:37 +02:00
catch_reenable_warnings.h Suppress warnings correctly for Intel compiler 2015-03-04 07:54:35 +00:00
catch_registry_hub.cpp First commit of STRINGIFY_ENUM 2019-04-04 15:55:46 +01:00
catch_reporter_registrars.hpp Rework how warning suppression in macros is done 2019-10-27 21:07:21 +01:00
catch_reporter_registry.cpp Sweep out some extra warnings 2017-09-07 17:25:15 +02:00
catch_reporter_registry.h Sweep out some extra warnings 2017-09-07 17:25:15 +02:00
catch_result_type.cpp Manual cherry-pick from #1111 2017-12-09 20:17:47 +01:00
catch_result_type.h Manual cherry-pick from #1111 2017-12-09 20:17:47 +01:00
catch_run_context.cpp Introduce Catch's own RNG based on the PCG family of RNGs 2019-10-07 19:56:23 +02:00
catch_run_context.h Introduce Catch's own RNG based on the PCG family of RNGs 2019-10-07 19:56:23 +02:00
catch_section.cpp Deprecated description in SECTION (still accepts it, for now, but doesn't use it anywhere) 2018-06-25 19:04:29 +01:00
catch_section.h Rework how warning suppression in macros is done 2019-10-27 21:07:21 +01:00
catch_section_info.cpp Deprecated description in SECTION (still accepts it, for now, but doesn't use it anywhere) 2018-06-25 19:04:29 +01:00
catch_section_info.h Restored description field in SectionInfo for now - but marked it deprecated 2018-06-25 20:18:41 +01:00
catch_session.cpp Some refactorings: 2020-01-25 09:01:04 +01:00
catch_session.h Use _WIN32 macro for detecting MSVC Windows 2019-07-06 16:55:10 +02:00
catch_singletons.cpp Added generic singletons facility 2018-08-19 10:34:44 +02:00
catch_singletons.hpp Added generic singletons facility 2018-08-19 10:34:44 +02:00
catch_startup_exception_registry.cpp Add support for -fno-exceptions (or equivalent) 2018-09-03 21:08:27 +02:00
catch_startup_exception_registry.h Made everything used in test case registration noexcept 2017-07-13 08:25:47 +01:00
catch_stream.cpp Integrate Nonius benchmark into Catch2 2019-06-06 19:33:37 +02:00
catch_stream.h Forbid copying ReusableStringStream 2019-11-04 00:05:35 +01:00
catch_string_manip.cpp Add trim for StringRef 2019-09-07 11:31:00 +02:00
catch_string_manip.h Add trim for StringRef 2019-09-07 11:31:00 +02:00
catch_stringref.cpp Rework StringRef interface and internals 2019-10-25 13:57:52 +02:00
catch_stringref.h Rework StringRef interface and internals 2019-10-25 13:57:52 +02:00
catch_suppress_warnings.h Improve explanation of why -Wparentheses suppression leaks 2019-01-25 21:29:12 +01:00
catch_tag_alias.cpp Split Option<T> and TagAlias definitions away from the main include path 2017-07-27 11:55:30 +02:00
catch_tag_alias.h Split Option<T> and TagAlias definitions away from the main include path 2017-07-27 11:55:30 +02:00
catch_tag_alias_autoregistrar.cpp Add support for -fno-exceptions (or equivalent) 2018-09-03 21:08:27 +02:00
catch_tag_alias_autoregistrar.h Rework how warning suppression in macros is done 2019-10-27 21:07:21 +01:00
catch_tag_alias_registry.cpp Introduced ReusableStringStream and removed all uses of std::ostringstream from the main path 2017-11-07 18:01:10 +00:00
catch_tag_alias_registry.h Split Option<T> and TagAlias definitions away from the main include path 2017-07-27 11:55:30 +02:00
catch_test_case_info.cpp Make hidden tags behave identically (#1847) 2020-01-31 21:44:06 +01:00
catch_test_case_info.h Cleanup for performance reasons 2018-03-02 16:24:35 +01:00
catch_test_case_registry_impl.cpp Introduce Catch's own RNG based on the PCG family of RNGs 2019-10-07 19:56:23 +02:00
catch_test_case_registry_impl.h Improve reporting of unmatched filters (#1684) 2019-08-06 20:51:19 +02:00
catch_test_case_tracker.cpp Some refactorings: 2020-01-25 09:01:04 +01:00
catch_test_case_tracker.h Ignore leading/trailing whitespace in test/section specs 2019-09-09 14:28:11 +02:00
catch_test_registry.cpp Add support for -fno-exceptions (or equivalent) 2018-09-03 21:08:27 +02:00
catch_test_registry.h Rework how warning suppression in macros is done 2019-10-27 21:07:21 +01:00
catch_test_spec.cpp Fixes #1766: Catch terminates when parsing invalid test name 2019-10-19 21:14:06 +02:00
catch_test_spec.h Fixes #1766: Catch terminates when parsing invalid test name 2019-10-19 21:14:06 +02:00
catch_test_spec_parser.cpp Split [.foo] into [.][foo] when parsing test specs 2019-11-05 23:28:47 +01:00
catch_test_spec_parser.h Split [.foo] into [.][foo] when parsing test specs 2019-11-05 23:28:47 +01:00
catch_text.h Removed tbc_text_format (superceded by TextFlow) 2017-07-20 23:20:42 +01:00
catch_timer.cpp ClockEstimate: DivByZero 2019-01-11 11:55:51 +01:00
catch_timer.h Increased int size for timers to avoid truncations 2017-12-08 15:59:00 +00:00
catch_to_string.hpp Provide a polyfill over `std::to_string` 2018-05-09 21:47:42 +02:00
catch_tostring.cpp Avoid technically UB type punning when determining endianness 2019-10-27 22:07:10 +01:00
catch_tostring.h Make StringRef's operator std::string explicit 2019-09-08 15:58:10 +02:00
catch_totals.cpp Changed all .hpp extensions to .h where there is now a corresponding .cpp 2017-09-07 11:24:33 +01:00
catch_totals.h Add option to warn when no tests ran 2018-02-09 18:49:36 +01:00
catch_uncaught_exceptions.cpp Remove superfluous comment 2018-02-08 13:09:02 +01:00
catch_uncaught_exceptions.h Redirect std::uncaught_exception to Catch::uncaught_exception 2018-02-02 15:36:15 +01:00
catch_user_interfaces.h Introduce a way to intentionally expose interface for use in tests 2017-11-21 11:10:07 +01:00
catch_version.cpp v2.11.1 2019-12-28 21:24:04 +01:00
catch_version.h Address results of PVS-Studio static analysis 2017-07-20 00:27:28 +02:00
catch_wildcard_pattern.cpp Ignore leading/trailing whitespace in test/section specs 2019-09-09 14:28:11 +02:00
catch_wildcard_pattern.h Ignore leading/trailing whitespace in test/section specs 2019-09-09 14:28:11 +02:00
catch_windows_h_proxy.h unconditional windows proxy 2017-10-11 14:58:20 +01:00
catch_xmlwriter.cpp Removed unneeded 'using uchar = unsigned char' 2020-01-24 14:26:22 +01:00
catch_xmlwriter.h Refactored XMLWriter to provide finer-grained control over formatting 2019-10-29 13:59:18 +01:00