PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/octave/primitive_ref_runme.m

#
Objective C | 53 lines | 40 code | 13 blank | 0 comment | 25 complexity | c6166d489e9679293da1c5d7c8fc4284 MD5 | raw file
 1primitive_ref
 2
 3if (ref_int(3) != 3)
 4    error
 5endif
 6
 7if (ref_uint(3) != 3)
 8    error
 9endif
10
11if (ref_short(3) != 3)
12    error
13endif
14
15if (ref_ushort(3) != 3)
16    error
17endif
18
19if (ref_long(3) != 3)
20    error
21endif
22
23if (ref_ulong(3) != 3)
24    error
25endif
26
27if (ref_schar(3) != 3)
28    error
29endif
30
31if (ref_uchar(3) != 3)
32    error
33endif
34
35if (ref_float(3.5) != 3.5)
36    error
37endif
38
39if (ref_double(3.5) != 3.5)
40    error
41endif
42
43if (ref_bool(true) != true)
44    error
45endif
46
47if (!strcmp(ref_char('x'),'x'))
48    error
49endif
50
51if (ref_over(0) != 0)
52    error
53endif