-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): update dependency catch2 to v3 #2205
Conversation
885a036
to
9dd3669
Compare
9dd3669
to
c655af6
Compare
c655af6
to
58db65b
Compare
58db65b
to
ae4b7ad
Compare
ae4b7ad
to
41cafe9
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. ⚠ Warning: custom changes will be lost. |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
almost ready for merge, one last CI fail to address |
Latest internal CI (with additional GPU bazel testing) - http://intel-ci.intel.com/eee2f6df-555e-f189-8390-a4bf010d0e2e. Haven't been able to replicate failures locally. |
/intelci: run |
/intelci: run |
/intelci: run |
1 similar comment
/intelci: run |
Should be ready for merge now, not sure what previous failures were but have had multiple successful runs today, just will wait for CI check after rebase to confirm |
/azp run CI |
Azure Pipelines successfully started running 1 pipeline(s). |
This PR contains the following updates:
v2.13.10
->v3.5.0
In addition to the WORKSPACE modifications that directly update catch, changes to the codebase were needed to accommodate the updates:
#include <catch2/catch.hpp>
becomes#include <catch2/catch_all.hpp>
INFO(...)
without a closing semi-colon toINFO(...);
INFO(...) { ... }
to eitherSECTION(...) { ... }
orINFO(...); ...
depending on if changes within brackets are used outside of the sectionRelease Notes
catchorg/Catch2 (catch2)
v3.5.0
Compare Source
Improvements
CATCH_CONFIG_PREFIX_MESSAGES
to prefix only logging macros (#2544)INFO
,UNSCOPED_INFO
,WARN
andCAPTURE
.const
misc-const-correctness
.from_range
generator supports C arrays and ranges that require ADL (#2737)std::optional
now also includesstd::nullopt
(#2740)Wunused-function
(#2726)random
Generators for integral types are now reproducible across different platforms<random>
, Catch2's generators also support 1 byte integral types (char
,bool
, ...)random
Generators forfloat
anddouble
are now reproducible across different platformslong double
varies across different platforms too much to be reproducibleFixes
operator "" _a
is UB,operator ""_a
is fine. Seriously.CAPTURE
tests failing to compile in C++23 mode (#2744)catch_message.hpp
(#2758)CHECK_ELSE
suppressing failure from uncaught exceptions(#2723)Miscellaneous
catch_discover_tests
when using custom reporter andPRE_TEST
discovery mode (#2747)catch_discover_tests
supports multi-config CMake generator inPRE_TEST
discovery mode (#2739, #2746)v3.4.0
Compare Source
3.4.0
Improvements
VectorEquals
supports elements that provide only==
and not!=
(#2648)SKIP
in generator constructor can be used to handle empty generator (#1593)TEST_CASE
andSECTION
macros (#2681)CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT
option and autodetects clang-tidy and Coverity.*_THROWS
,*_THROWS_AS
, etc now suppress warning coming from__attribute__((warn_unused_result))
on GCC (#2691)[[nodiscard]]
, this warning is not silenced by void cast. WTF GCC?Fixes
assertionStarting
events being sent after the expr is evaluated (#2678)TEST_CASE
tags are now reported nicely (#2650)Miscellaneous
catch_discover_tests
v3.3.2
Compare Source
Improvements
SECTION
/TEST_CASE
.CAPTURE
,TEST_CASE_METHOD
,METHOD_AS_TEST_CASE
, andTEMPLATE_LIST_TEST_*
macros.Contains
,RangeEquals
andUnorderedRangeEquals
matchers now support ranges with iterator + sentinel pairIsNaN
matcherREQUIRE(isnan(x))
,REQUIRE_THAT(x, IsNaN())
shows you the value ofx
.declared_but_not_referenced
warning for NVHPC (#2637)Fixes
v3.3.1
Compare Source
Improvements
SECTION
s, especially siblingSECTION
sv3.3.0
Compare Source
Improvements
MessageMatches
exception matcher (#2570)RangeEquals
andUnorderedRangeEquals
generic range matchers (#2377)SKIP
macro for skipping tests from within the test body (#2360)skipTest
reporter event is unrelated to this, and has been deprecated since it has practically no usesFixes
Miscellaneous
v3.2.1
Compare Source
Improvements
v3.2.0
Compare Source
3.2.0
Improvements
CATCH_CONFIG_GETENV
compile-time toggle (#2562)std::getenv
when reading env variablesTESTBRIDGE_TEST_ONLY
is now supported (#2490)TEST_SHARD_INDEX
,TEST_TOTAL_SHARDS
,TEST_SHARD_STATUS_FILE
, are now all supported (#2491)std::*_ordering
types, which cannot be compared with anint
variable, only0
REQUIRE
and friendsREQUIRE_THAT
and friendsFixes
-Wcomma
warning rarely occuring in templated test cases (#2543)INFO
(#2564)MatcherGenericBase
copy constructor const (#2566)./tests/SelfTest "aaa bbb", [approx]
outputsFilters: "aaa bbb",[approx]
Miscellaneous
-ffile-prefix-map
setting to dependees (#2533)v3.1.1
Compare Source
Improvements
Catch::getSeed
function that user code can call to retrieve current rng-seed-ffile-prefix-map
(#2517)SOVERSION
set (#2516)catch2/catch_all.hpp
convenience header no longer transitively includeswindows.h
(#2432, #2526)Fixes
-Wuseless-cast
warnings inREQUIRE_THROWS*
macros (#2520, #2521)void
nvc++
(#2533)DL_PATHS
argument tocatch_discover_tests
on MacOS (#2483)*-avoid-c-arrays
clang-tidy warning inTEMPLATE_TEST_CASE
(#2095, #2536)Miscellaneous
v3.1.0
Compare Source
Improvements
-Wparentheses
for older GCCs_Pragma
s in the C++ frontend.random
generator (#2433)std::uniform_int_distribution
BAZEL_TEST
environment variable (#2459)CATCH_CONFIG_BAZEL_SUPPORT
configuration option is also still supported.catch_discover_tests
now has a new options for setting library load path(s) when running the Catch2 binary (#2467)Fixes
Miscellaneous
catch_discover_tests
, it supports very limited number of options and customizationv3.0.1
Compare Source
Catch2 now uses statically compiled library as its distribution model.
This also means that to get all of Catch2's functionality in a test file,
you have to include multiple headers.
You probably want to look into the migration docs,
which were written to help people coming from v2.x.x versions to the
v3 releases.
FAQ
catch_all.hpp
header.catch.hpp
withcatch_all.hpp
?catch_all.hpp
exists for two reasons. One of them is to provide a way for quick migration from Catch2, the second one is to provide a simple way to test things with Catch2. Using it for migration has one drawback in that it is big. This means that including it will cause significant compile time drag, and so using it to migrate should be a conscious decision by the user, not something they can just stumble into unknowingly.(Potentially) Breaking changes
catch.hpp
no longer worksANON_TEST_CASE
has been removed, useTEST_CASE
with no arguments instead (#1220)--list*
commands no longer have non-zero return code (#1410)--list-test-names-only
has been removed (#1190)--list-tests
instead--list*
commands are now piped through the reportersTEST_CASE
description support has been removedTEST_CASE("A", "[.foo]")
would be included by asking for~[bar]
.PredicateMatcher
is no longer type erased.PredicateMatcher
's typeSectionInfo
no longer contains section description as a member (#1319)SECTION("ShortName", "Long and wordy description")
, but the description is thrown awayconst char*
or be implicitly convertible to it[!hide]
tag has been removed.[.]
or[.foo]
instead.REGISTER_TEST_CASE
macro need to be followed by a semicolonTEST_CASE
and friends in any wayIStreamingReporter::IsMulti
member function was removedListeningReporter
is nowfinal
UnorderedEquals
vector matcher) are nowfinal
final
Catch
namespaceCatch::Matchers
namespaceCATCH_CONFIG_MAIN
will no longer create main in that TU.libCatch2Main.a
, or the proper CMake/pkg-config targetcatch2/catch_session.hpp
CATCH_CONFIG_EXTERNAL_INTERFACES
has been removed.CATCH_CONFIG_IMPL
has been removed.TestEventListenerBase
was renamed toEventListenerBase
EventListenerBase
now directly derives fromIStreamingReporter
, instead of deriving fromStreamingReporterBase
GENERATE
decays its arguments (#2012, #2040)str
inauto str = GENERATE("aa", "bb", "cc");
is inferred tochar const*
rather thanconst char[2]
.--list-*
flags write their output to file specified by the-o
flag--list-tests
,-l
, has been removed.--list-tags
,-t
, has been removed.--colour
option has been replaced with--colour-mode
optionImprovements
match
(#1307, #1553, #1554, #1843)match
member functionIsEmpty
,SizeIs
which check that the range has specific propertiesContains
, which checks whether a range contains a specific elementAllMatch
,AnyMatch
,NoneMatch
range matchers, which apply matchers over a range of elementscatch_test_macros.hpp
is 80% cheaper than includingcatch.hpp
REQUIRE(true)
gmtime_r
, rather thangmtime
when constructing a date string (#2008, #2165)--list-*
flags write their output to file specified by the-o
flag (#2061, #2163)Approx::operator()
is now properlyconst
--rng-seed
now accepts string"random-device"
to generate random seed usingstd::random_device
STATIC_CHECK
macro, similar toSTATIC_REQUIRE
(#2318)CHECK
, and not likeREQUIRE
.UnmatchedTestSpec
, to error on test specs with no matching tests-w
,--warn
warning flags can now be provided multiple times to enable multiple warningsuint64_t
on all platforms, instead of usingsize_t
type.-o
,--out
output destination specifiers recognize-
as stdout--out=-
to avoid CLI error about missing option-
as stdout-r
,--reporter
flag now also accepts optional output destination::
.XML_OUTPUT_FILE
env var (#2399)--skip-benchmarks
flag to run tests without anyBENCHMARK
s (#2392, #2408)--list-listeners
Fixes
INFO
macro no longer contains superfluous semicolon (#1456)--list*
family of command line flags now return 0 on success (#1410, #1146)random
generators returning the same value over and over againOther changes
CATCH_CONFIG_DISABLE_MATCHERS
no longer exists.CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER
no longer exists.StringMaker
specializations for<chrono>
are always providedCatch2
andCatch2WithMain
.Catch2
is the statically compiled implementation by itselfCatch2WithMain
also links in the default maincatch2
is the statically compiled implementation by itselfcatch2-with-main
also links in the default main--allow-running-no-tests
overrides this behaviour.NoTests
warning has been removed because it is fully subsumed by this change.CATCH_CONFIG_FOO
) can be set through CMake options of the same nameCATCH_CONFIG_NO_FOO
overrides,-DCATCH_CONFIG_DEFAULT_REPORTER=compact
changes default reporter to "compact"-DCATCH_CONFIG_NO_ANDROID_LOGWRITE=ON
forces android logwrite to off-DCATCH_CONFIG_ANDROID_LOGWRITE=OFF
does nothing (the define will not exist)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.