相关代码 |
|
class LeftShiftTest extends GroovyTestCase { def foo = [1, 2, 3] void testShift() { def x = 4 def y = x println "Value is $y" assert y == 16 assert x } void testShiftList() { def list = [] for (i in 1..10) { list } println "List is $list" } void testLeftShiftOnExpression() { this.foo assert foo == [1, 2, 3, 4] } }