~ubuntu-branches/ubuntu/saucy/gnudatalanguage/saucy-proposed

« back to all changes in this revision

Viewing changes to testsuite/test_extra_keywords.pro

  • Committer: Package Import Robot
  • Author(s): Axel Beckert
  • Date: 2013-05-15 02:23:58 UTC
  • mfrom: (15.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130515022358-rziznpf225zn9lv9
Tags: 0.9.3-2
* Upload to unstable.
* Revamp debian/rules
  - Allow parallel builds
  - Use debian/manpages instead of dh_installman parameter
  - Switch to dh7 style debian/rules file
* Bump debhelper compatibility to 9
  - Update versioned debhelper build-dependency
* Bump Standards-Version to 3.9.4 (no changes)
* Apply wrap-and-sort

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;; Sacha Hony and Alain Coulais, 18 September 2012
 
2
;;
 
3
;; testing whether the _EXTRA are working as expected.
 
4
;;
 
5
;; It looks like IDL does not pass on _extra arguments that are
 
6
;; accepted by the pro/function which is being called
 
7
;
 
8
; --------------------------------------------
 
9
;
 
10
pro FFT_EXTRA_KEYWORDS, x, _extra=_extra, by_execute=by_execute
 
11
;
 
12
ON_ERROR, 2
 
13
;
 
14
common cerror, error
 
15
;
 
16
ok=EXECUTE("z1=FFT(x)")
 
17
pb=EXECUTE("z2=FFT(x,_extra=_extra)")
 
18
;
 
19
z3=FFT(x,_extra=_extra)
 
20
;
 
21
print, ok, pb, total(abs(z1)), total(abs(z2))
 
22
;
 
23
error=0
 
24
end
 
25
;
 
26
; --------------------------------------------
 
27
;
 
28
pro PLOT_EXTRA_KEYWORDS, x, _extra=_extra, by_execute=by_execute
 
29
;
 
30
ON_ERROR, 2
 
31
;
 
32
common cerror, error
 
33
;
 
34
PLOT, x,_extra=_extra
 
35
;
 
36
; if fact, xrange is not used by OPLOT ...
 
37
; (and is not is the keyword list ...)
 
38
;
 
39
print, !error_state
 
40
OPLOT, x,_extra=_extra, col=250
 
41
print, !error_state
 
42
;
 
43
error=0
 
44
end
 
45
;
 
46
; --------------------------------------------
 
47
;; Error message:
 
48
;; % OPLOT: Keyword XRANGE not allowed in call to: OPLOT
 
49
;
 
50
pro TEST_EXTRA_KEYWORDS
 
51
;
 
52
common cerror, error
 
53
;
 
54
nb_errors=0
 
55
;
 
56
error=1
 
57
x=DINDGEN(10)
 
58
PLOT_EXTRA_KEYWORDS, x, xrange=[0,5]
 
59
if error EQ 1 then nb_errors=nb_errors+1
 
60
;
 
61
error=1
 
62
x=DIST(128,64)
 
63
FFT_EXTRA_KEYWORDS, x, dim=1
 
64
FFT_EXTRA_KEYWORDS, x, forthefun=1
 
65
if error EQ 1 then nb_errors=nb_errors+1
 
66
;
 
67
end