Closed GoogleCodeExporter closed 9 years ago
In most situations, a >= b is the same as !(a < b). Defining it differently is
counter-intuitive ind will most likely lead to bugs. Likewise, providing
corresponding test macros in a general-purpose library will be confusing for
people.
It may be necessary in some situations, but the negatives outweigh the
advantages here, IMO. You, however, can define just such a macro for your own
purposes using predicate formatters
(http://code.google.com/p/googletest/wiki/AdvancedGuide#Using_a_Predicate-Format
ter). You can look at the definition of the standard EXPECT_XX macros for an
expample: they are defined via the same mechanism.
Original comment by vladlosev
on 7 Oct 2011 at 10:55
It is correct that a >= b is same as !(a < b)
But I wanted to do the opposite:
Check that !(a < b) is same as a >= b.
Original comment by NN1436401@gmail.com
on 8 Oct 2011 at 4:21
Original issue reported on code.google.com by
NN1436401@gmail.com
on 3 Oct 2011 at 4:02