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

« back to all changes in this revision

Viewing changes to Examples/test-suite/lua/primitive_ref_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("primitive_ref") -- import code
 
3
pr=primitive_ref --alias
 
4
 
 
5
assert(pr.ref_int(3)==3)
 
6
 
 
7
assert(pr.ref_uint(3) == 3)
 
8
 
 
9
assert(pr.ref_short(3) == 3)
 
10
 
 
11
assert(pr.ref_ushort(3) == 3)
 
12
 
 
13
assert(pr.ref_long(3) == 3)
 
14
 
 
15
assert(pr.ref_ulong(3) == 3)
 
16
 
 
17
assert(pr.ref_schar(3) == 3)
 
18
 
 
19
assert(pr.ref_uchar(3) == 3)
 
20
 
 
21
assert(pr.ref_float(3.5) == 3.5)
 
22
 
 
23
assert(pr.ref_double(3.5) == 3.5)
 
24
 
 
25
assert(pr.ref_bool(true) == true)
 
26
 
 
27
assert(pr.ref_char('x') == 'x')
 
28
 
 
29
assert(pr.ref_over(0) == 0)
 
30
 
 
31
a=pr.A(12)
 
32
assert(pr.ref_over(a)==12)