For a method called assert, I'd have opposite expectations to what this cool lib is doing...
In other languages / framework I know of, an assertion is expected to be true.
assert calls would throw or display a message when an assertion is violated, i.e. it's false.
For a method called
assert
, I'd have opposite expectations to what this cool lib is doing...In other languages / framework I know of, an assertion is expected to be true.
assert
calls would throw or display a message when an assertion is violated, i.e. it's false.Example in C#
This library displays a green message when asserts are true. Seems to me it should instead display a red message when asserts are false.
The choice of color (green) is itself an indication this is backwards: we need to know what's wrong (red) not what's working as intended (green).