PV-WAVE Advantage > JWAVE User Guide > JWAVE Wrapper API > WRAPPER_TEST_INIT Procedure   
WRAPPER_TEST_INIT Procedure   
Initializes a JWAVE wrapper function test.
Usage
WRAPPER_TEST_INIT, wrapper_name[, width, height ]
Input Parameters
wrapper_name—A string containing the name of the wrapper function that you wish to test.
width, height—(optional) Specifies the width and height of the graphics window, in pixels.
Discussion
Before using the other WRAPPER_TEST_* routines, you must execute WRAPPER_TEST_INIT.
If width and height are not set, then WRAPPER_TEST_EXECUTE does not display a plot, even if the JWAVE wrapper returns a graphic. If width and height are set, a PV‑WAVE window appears even if the JWAVE wrapper does not return any graphics.
Examples
The following lines demonstrate the use of the WRAPPER_TEST_* commands to test a JWAVE wrapper called testplot.pro. You can find this wrapper in:
(UNIX) RW_DIR/jwave-3_6/lib/user
(WIN) RW_DIR\jwave-3_6\lib\user
where RW_DIR is the main Rogue Wave installation directory.
WAVE> WRAPPER_TEST_INIT, 'TESTPLOT', 400, 300 
WAVE> WRAPPER_TEST_SETCOLOR, 'BACKGROUND', '919191'xL 
WAVE> WRAPPER_TEST_SETCOLOR, 'LINE', 'ff0000'xL 
WAVE> WRAPPER_TEST_SETCOLOR, 'SYMBOLS', $ 
  ['ff00ff'xL, '00ffff'xL, 'ffff00'xL], /Color_Set 
WAVE> WRAPPER_TEST_SETPARAM, 'DATA', HANNING(20) 
WAVE> WRAPPER_TEST_SETPARAM, 'SYMBOL', 1 
WAVE> WRAPPER_TEST_EXECUTE 
(At this point, the returned graphic appears in a PV‑WAVE graphics window.)
WAVE> WRAPPER_TEST_RETURN_INFO 
      DATA            INT       =        0
The following lines demonstrate, additionally, the use of the function WRAPPER_TEST_GETRETURN. Here, the simple.pro wrapper is used. This wrapper returns the square root of the input parameter. You can find this procedure in the same directory as testplot.pro, described previously. This wrapper only returns a numerical result and not graphics.
WAVE> WRAPPER_TEST_INIT, 'SIMPLE' 
WAVE> WRAPPER_TEST_SETPARAM, 'NUMBER', 2 
WAVE> WRAPPER_TEST_EXECUTE 
WAVE> PRINT, WRAPPER_TEST_GETRETURN('DATA') 
        1.41421
WAVE> WRAPPER_TEST_RETURN_INFO 
      DATA            FLOAT     =       1.41421
See Also