Skip to content

Add possibility to specify argument matchers #11

@tudortimi-ifx

Description

@tudortimi-ifx

I've run into the first situation where I would like to write a test that only checks some aspect of an argument (that it's in a certain range, for example) and not for equality with a certain value. It would be great if we could start thinking about how to specify matchers.

Maybe something like:

// specifies a matcher for each argument
`EXPECT_CALL(mock, some_func).with_arg_matchers(matcher0, matcher1)

We could implement something like a "don't care" matcher (equivalent to GMock's "_"), but the syntax will be very verbose (unless we trade off compile time safety), due to the lack of parameter inference/function overloading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions