diff --git a/tests/dogs.xgo b/tests/dogs.xgo index 3105e67..218e84e 100644 --- a/tests/dogs.xgo +++ b/tests/dogs.xgo @@ -1,8 +1,22 @@ +objects := import("objects") +fmt := import("fmt") + +new := func(name) { + ret := objects.new() + ret.name = name + + ret.def("bark", func(self, n){ + fmt.print(self.name, ": ") + for i:=0 ; i