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

« back to all changes in this revision

Viewing changes to Examples/test-suite/perl5/apply_signed_char_runme.pl

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-11-10 16:29:56 UTC
  • mfrom: (1.2.8 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20081110162956-xue6itkuqhbza87s
Tags: 1.3.36-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop pike and libchicken-dev from the build-depends 
    (both are universe)
  - Use python2.5 instead of python2.4.
  - use php5
  - Clean Runtime/ as well.
  - debian/Rules (clean): Remove Lib/ocaml/swigp4.ml.
  - drop "--without-mzscheme", we don't have it in our build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
use strict;
 
3
use warnings;
 
4
use Test::More tests => 12;
 
5
BEGIN { use_ok('apply_signed_char') }
 
6
require_ok('apply_signed_char');
 
7
 
 
8
# adapted from ../java/apply_signed_char_runme.java
 
9
 
 
10
my $smallnum = -127;
 
11
is(apply_signed_char::CharValFunction($smallnum), $smallnum);
 
12
is(apply_signed_char::CCharValFunction($smallnum), $smallnum);
 
13
is(apply_signed_char::CCharRefFunction($smallnum), $smallnum);
 
14
 
 
15
$apply_signed_char::globalchar = $smallnum;
 
16
is($apply_signed_char::globalchar, $smallnum);
 
17
is($apply_signed_char::globalconstchar, -110);
 
18
 
 
19
my $d = new apply_signed_char::DirectorTest();
 
20
is($d->CharValFunction($smallnum), $smallnum);
 
21
is($d->CCharValFunction($smallnum), $smallnum);
 
22
is($d->CCharRefFunction($smallnum), $smallnum);
 
23
 
 
24
$d->{memberchar} = $smallnum;
 
25
is($d->{memberchar}, $smallnum);
 
26
is($d->{memberconstchar}, -112);