Menu

#20 Adding new CompareTo style asserts

open
Main module (8)
5
2007-02-26
2007-02-26
No

Hi,
I'm not sure if this is still an active project but I was wondering if you could add some assert methods that use compare to.

Something like

assertComparesEquals(String error, Comparable c1, Comparable c2);

This is useful in cases such as BigDecimal where .equals fails if the scale is different, but compareTo() returns 0 if the value of the two big decimals is equal regardless of Scale.

Thanks,

Bryant

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.