blob: d8a478e28d770abdba7d3dc0668e5e333018eb10 [file] [log] [blame]
class NegationTests extends GroovyTestCase {
void testNegateInteger() {
a = -1
assert a == -1
}
void testNegateIntegerExpression() {
a = -1
a = -a
assert a == 1
}
void testNegateDouble() {
a = -1.0
assert a == -1.0
}
void testNegateDoubleExpression() {
a = -1.0
a = -a
assert a == 1.0
}
}