skyscreamer / JSONassert

Write JSON unit tests in less code. Great for testing REST interfaces.
http://jsonassert.skyscreamer.org
Apache License 2.0
1k stars 197 forks source link

Enhancement: Allow for lazily-constructed messages #185

Open stdedos opened 5 months ago

stdedos commented 5 months ago

https://junit.org/junit5/docs/snapshot/user-guide/#writing-tests

        assertTrue('a' < 'b', () -> "Assertion messages can be lazily evaluated -- "
                + "to avoid constructing complex messages unnecessarily.");

Maybe you can pass the library's result.getMessage() as an optional parameter (so the user can use the message themselves, or not)

Maybe a tangent to https://github.com/skyscreamer/JSONassert/issues/183

carterpage commented 3 months ago

Are you having performance problems with the library?

stdedos commented 3 months ago

No, but "maybe" I could do something about https://github.com/skyscreamer/JSONassert/issues/183#issuecomment-2254005714

I think pre-computing all tests' diffs by myself will kill performance