File: test_fixprint.pro

package info (click to toggle)
gnudatalanguage 1.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 80,368 kB
  • sloc: cpp: 189,797; ansic: 46,721; sh: 677; python: 474; makefile: 146; xml: 69; f90: 28
file content (34 lines) | stat: -rw-r--r-- 846 bytes parent folder | download | duplicates (8)
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
; by Sylwester Arabas <slayoo@igf.fuw.edu.pl>
pro test_fixprint

  if ~execute('a=fix(0,type=0)') then begin
    message, 'fix(type=0) failed!', /conti
    exit, status=1
  endif

  if (fix('123',/print,type=1))[0] ne 123 then begin
    message, 'fix(string,/print,type=byte) failed!', /conti
    exit, status=1
  endif

  if (fix(123,/print,type=1))[0] ne 123 then begin
    message, 'fix(int,/print,type=byte) failed!', /conti
    exit, status=1
  endif

  if (fix('123',type=1))[0] ne 49 then begin
    message, 'fix(string,type=byte) failed!', /conti
    exit, status=1
  endif

  if fix(123b,/print,type=7) ne ' 123' then begin
    message, 'fix(byte,/print,type=string) failed!', /conti
    exit, status=1
  endif

  if fix(123b,type=7) ne '{' then begin
    message, 'fix(byte,type=string) failed!', /conti
    exit, status=1
  endif

end