Doctests are simple tests embedded in the documentation.
Inside a "tests" tag, any line that starts with "IDL> " would be executed and the output compared to the following line(s) that don't start with "IDL> ".
For example:
;+
; Factorial function.
;
; :Tests:
; IDL> a = factorial(5)
; IDL> print, a
; 120
;-
The commands in a single :Tests: tag should run in a single scope (so the a variable above is seen by the second command).
Doctests are simple tests embedded in the documentation.
Inside a "tests" tag, any line that starts with "IDL> " would be executed and the output compared to the following line(s) that don't start with "IDL> ".
For example:
The commands in a single
:Tests:
tag should run in a single scope (so thea
variable above is seen by the second command).