I saw my solution was marked out of date, so I updated and now I have the same error. The update involved adding a catch2 custom matcher and that seems to be the problem. According to the Google AI summary, in catch2 v3, “matcher namespaces were reorganized and flattened, primarily moving matchers into the Catch::Matchers namespace for a cleaner structure.” So I think that in v3, line 29 of the test code should read
class ComplexApproxMatcher : public Catch::Matchers::MatcherBase<Complex> {
Well, this is a total mess! I installed catch2 3.4.10, like this, replacing my existing installation of catch2 2.3.10, made the suggested change to complex_test.cpp, and tried to compile this. I hit a compiler error about catch2/catch.hpp not being found. It seems like that header file is now called catch2/catch_all.hpp. I added a symlink to fix that. Once I made all these changes, I was able to get all the tests to pass locally.
I would make a PR to fix this, but I have no idea what all I need to change. I’ll leave this up to the maintainers of this track. Also, I’m curious how this even passes the CI. It seems like that should have failed once catch2 3.x was introduced.
Among the tracks I’ve seen, it’s common (and desirable) to not run the test runner image within the CI. That way, you upgrade the test runner and the exercise solutions simultaneously. Otherwise, you’d need to deploy the upgraded test runner first and then update the exercises. If the CI breaks, that’s now you need to fix while the test runner is live. If it ends up being a test runner issue, only guardians can sign off on the PR so that lengthens the maintenance window.
Thanks for flagging this! It was indeed caused by the inconsistency of Catch2 versions being used between cpp repo and test runner. A workaround has been merged now, so things should be working as expected again. However, I think it also makes sense to include a CI job that tests against the test runner. It’s not the first time we have an issue like this, unfortunately…