Skip to content

CMake ParseAndAddCatchTest TEST_CASE_METHOD broken in 2.13.3 #2092

@NeroBurner

Description

@NeroBurner

Describe the bug

The improved regex breaks test-fixtures (like TEST_CASE_METHOD(fixture, "testname")) detection of the ParseAndAddCatchTest helper script

Expected behavior
TEST_CASE_METHOD(fixture, "testcase") tests should be part of the detected test cases

Reproduction steps

add a testcase with a fixture like

TEST_CASE_METHOD(fixture, "testname")
{
    REQUIRE(true);
}

See that the current regex doesn't match the test case with fixture

https://regex101.com/r/j6Y4n9/1

Platform information:

  • Catch version: 2.13.3 (introduced in 2.13.2 with regex change for TEMPLATE_TEST_CASE() and not fixed by my new regex in 2.13.3)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExtrasTouches utility scripts outside of Catch2 proper, e.g. CMake integration.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions