malsyned / pfstest

Professional Firmware Services Unit Test Framework
Other
1 stars 0 forks source link

Coerce values and matchers into arg_handlers in mocks #59

Closed malsyned closed 6 years ago

malsyned commented 6 years ago

If a matcher is passed as an arg_handler, it should be automatically wrapped with arg_that(). If a value is passed, it should be automatically wrapped in an is() matcher, and then that should be wrapped in an arg_that().

This might be fairly involved, but it would make a lot of mock expectations a lot cleaner looking and easier to write.

We would need some way of tagging values, matchers, and arg-handlers with type tags (perhaps allocated at runtime from a type tag generator), and some default matcher and default arg_handler.