It was used in checking that types in TEMPLATE_TEST_CASE and friends
were unique, but this was removed for v2.8.0 (#1628). Since there
are no further uses of this trait, the simplest thing to do is to
just remove it.
Fixes#1757
The leading/trailing whitespace is problematic because of e.g.
`WHEN` macro having preceeding whitespace for alignment, and it is
generally messy.
Credits to Phil who did lot of the original work.
Closes#1708
This way it is explicit when there is a `StringRef` -> `std::string`
conversion and makes it easier to look for allocations that could
be avoided.
Doing this has already removed one allocation per registered test
case, as there was a completely pointless `StringRef` -> `std::string`
conversion when parsing tags of a test case.
The old code was a left-over from the times when the
`capturedExpression` member was a `const char*`, which could always
be indexed. With the change to use `StringRef`, blindly indexing 0th
element is invalid, as it is not indexable part of a StringRef.
The parameter given to `convert` may not be copyable therefore it has to be
captured by const reference. For example an `std::tuple` that contains a
non-copyable type is itself non-copyable.
The NonDefaultConstructible test-case was reduced by one example type
because it did not add any value.
`print` version of the logging functions supports `printf`-like
formatting, which we do not use and given our current debug print
internals, will never use. This should be slightly more efficient
and expresses the intent better.
They lead to stringification of file (which is ok) and file line
(not ok) to the approvals, which makes them exceedingly brittle
and not worth approval testing. Instead we just run them as part
of the base test run.
This PR ultimately does 3 things
* Separately tracks matched tests per each filter part (that is, a set of filters separated by an OR (`,`)), which allows Catch2 to report each of the alternative filters that don't match any tests.
* Fixes `-w NoTests` to return non-zero in the process
* Adds tests for `-w NoTests`.
Noticed that the code was originally concatenating strings just to
then append the result to another string. Now it does not create
temporaries and also preallocates the string buffer.
Under WSL, Python in text mode will translate `\n` into `\r\n`, even
though other tools and utilities use `\n` (because WSL is basically
Linux). This leads to the update scripts leaving the files with
Windows newlines even though git and similar expect them to have
Linux newlines.
By instead handling files in binary mode, we can keep the original
newlines. This commits switches parts of the update process to
binary mode, but not all because some of the will require a lot of
work to fix.