4 ms·
The kind of verbosity you describe isn't really the issue in my view. The contentious verbosity is theKindWhereVariableNamesLookLikeThis and "fluent" programmin
by sidlls 8y ago
The kind of verbosity you describe isn't really the issue in my view. The contentious verbosity is theKindWhereVariableNamesLookLikeThis and "fluent" programming style that turns "assert(testRes == expected)" into "assertThat(testRes).isEqualTo(expected)". It's excessive and removes value most of the time.
- jimmyspice 8y agoWell the fluent style is more verbose, but has the advantage of telling you more information about what went wrong. You get a report telling you that "x was not equal to y" rather than "expected true". The verbosity is way more helpful to me.
- polityagent 8y agoor you can use a language with macros, then a testing library can report the code being evaluated and the values in it.
- sidlls 8y agoEven Java has testing libraries that provide optional failure case messages with asserts to provide specific context where necessary.