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