~ubuntu-branches/ubuntu/edgy/swig1.3/edgy

« back to all changes in this revision

Viewing changes to Examples/test-suite/lua/newobject1_runme.lua

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require("import")       -- the import fn
 
2
import("newobject1")    -- import code
 
3
 
 
4
foo1 = newobject1.Foo_makeFoo() -- lua doesnt yet support static fns properly
 
5
assert(newobject1.Foo_fooCount() == 1)  -- lua doesnt yet support static fns properly
 
6
 
 
7
foo2 = foo1:makeMore()
 
8
assert(newobject1.Foo_fooCount() == 2)
 
9
 
 
10
foo1 = nil 
 
11
collectgarbage()
 
12
assert(newobject1.Foo_fooCount() == 1)
 
13
 
 
14
foo2 = nil 
 
15
collectgarbage()
 
16
assert(newobject1.Foo_fooCount() == 0)