ChaiScript/unittests/object_attr.chai

7 lines
117 B
ChaiScript

attr bob::z
def bob::bob() { this.z = 10 }
var x = bob()
def bob::fred(x) { this.z - x }
assert_equal(7, x.fred(3))