Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Richer So() assertions #5

Open
gdamore opened this issue Dec 19, 2016 · 0 comments
Open

Richer So() assertions #5

gdamore opened this issue Dec 19, 2016 · 0 comments

Comments

@gdamore
Copy link
Owner

gdamore commented Dec 19, 2016

We could implement an extended version of So that is variadic, and then define custom assertions against them, like GoConvey has. I imagine that we'd have an "assertion" type that's actually a function pointer (could be variadic), that returns a result, which would include information appropriate for logs, and which would take the arguments.

Because C is strongly typed, we'd probably need versions of these macros that understand different types. I think this would be relatively straight-forward, other than it requires C99 variadics. (Fortunately I think these are supported ~everywhere these days.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant