summaryrefslogtreecommitdiff
path: root/Examples/test-suite/perl5/primitive_ref_runme.pl
blob: 727b3ec6ef18852b1e06db1718e9b075705a9c1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use primitive_ref;

if (primitive_ref::ref_int(3) != 3) {
    print "ref_int failed!\n";
}
if (primitive_ref::ref_uint(3) != 3) {
    print "ref_uint failed!\n";
}
if (primitive_ref::ref_short(3) != 3) {
    print "ref_short failed!\n";
}
if (primitive_ref::ref_ushort(3) != 3) {
    print "ref_ushort failed!\n";
}
if (primitive_ref::ref_long(3) != 3) {
    print "ref_long failed!\n";
}
if (primitive_ref::ref_ulong(3) != 3) {
    print "ref_ulong failed!\n";
}
if (primitive_ref::ref_schar(3) != 3) {
    print "ref_schar failed!\n";
}
if (primitive_ref::ref_uchar(3) != 3) {
    print "ref_uchar failed!\n";
}
if (primitive_ref::ref_bool(1) != 1) {
    print "ref_bool failed!\n";
}
if (primitive_ref::ref_float(3.5) != 3.5) {
    print "ref_float failed!\n";
}
if (primitive_ref::ref_double(3.5) != 3.5) {
    print "ref_double failed!\n";
}
if (primitive_ref::ref_char('x') != 'x') {
    print "ref_char failed!\n";
}