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

Power Assertions for Java #47

Open
stokito opened this issue May 18, 2018 · 2 comments
Open

Power Assertions for Java #47

stokito opened this issue May 18, 2018 · 2 comments

Comments

@stokito
Copy link

stokito commented May 18, 2018

Please take this project too under your umbrella https://github.com/jkschneider/java-power-assert
I can't tell you exactly what it may need to change but it's better to notify authors

@kcooney
Copy link

kcooney commented Jun 1, 2018

Sorry, I am not quite sure what you are requesting here.

@vlsi
Copy link

vlsi commented Feb 27, 2023

@kcooney , I've described a couple of cases in the following issues:

For opentest4j, it might be relevant for ValueWrapper:

public static ValueWrapper create(Object value, String stringRepresentation) {

Currently, the user has to provide stringRepresentation manually.
However, when no stringRepresentation is provided, the compiler could infer and provide a decent fallback.
For instance, suppose the user writes ValueWrapper.create(resultSet.next()), and the compiler transforms it into ValueWrapper(resultSet.next(), "resultSet.next()").

Then users get better-than-nothing representations while they still write tests as usual.
Of course, it won't completely replace human-provided messages, however, it would still be helpful.

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

3 participants