Skip to content

mock: AssertExpectations - disable log output for "pass" #782

@AntonStoeckl

Description

@AntonStoeckl

Currently there is no way to silence AssertExpectations if all expectations pass.
I find this output "PASS: ....." quite annoying and superfluous.
I assume most people are only interested in failures but don't need output of every passing assertion. It also seems inconsistent with other Assert... methods, which don't report success, only failure.

If this would be my userland code, I'd simply remove the log output for "PASS", but in a lib that's not good style.

I currently don't see a clean, backwards compatible way to optionally disable the logging for success cases. Maybe a new method like AssertFailedExpectations()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpkg-mockAny issues related to Mock

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions