PageRenderTime 21ms CodeModel.GetById 16ms app.highlight 4ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-26/SWIG/Examples/test-suite/perl5/primitive_ref_runme.pl

#
Perl | 38 lines | 37 code | 1 blank | 0 comment | 24 complexity | 11138125c10bf0f0962ee58acb085a3d MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1use primitive_ref;
 2
 3if (primitive_ref::ref_int(3) != 3) {
 4    die "ref_int failed!\n";
 5}
 6if (primitive_ref::ref_uint(3) != 3) {
 7    die "ref_uint failed!\n";
 8}
 9if (primitive_ref::ref_short(3) != 3) {
10    die "ref_short failed!\n";
11}
12if (primitive_ref::ref_ushort(3) != 3) {
13    die "ref_ushort failed!\n";
14}
15if (primitive_ref::ref_long(3) != 3) {
16    die "ref_long failed!\n";
17}
18if (primitive_ref::ref_ulong(3) != 3) {
19    die "ref_ulong failed!\n";
20}
21if (primitive_ref::ref_schar(3) != 3) {
22    die "ref_schar failed!\n";
23}
24if (primitive_ref::ref_uchar(3) != 3) {
25    die "ref_uchar failed!\n";
26}
27if (primitive_ref::ref_bool(1) != 1) {
28    die "ref_bool failed!\n";
29}
30if (primitive_ref::ref_float(3.5) != 3.5) {
31    die "ref_float failed!\n";
32}
33if (primitive_ref::ref_double(3.5) != 3.5) {
34    die "ref_double failed!\n";
35}
36if (primitive_ref::ref_char('x') != 'x') {
37    die "ref_char failed!\n";
38}