Skip to content

Commit 4c78b88

Browse files
Update tests for new routine signatures
1 parent 3a749db commit 4c78b88

43 files changed

Lines changed: 239 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

libs/tests/hover-help/src/lib/bracket-paren.1.spec.ts

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,24 @@ describe(`[auto generated] Correctly provides hover help for`, () => {
8080
'[Online Docs](https://www.nv5geospatialsoftware.com/docs/IDL_String.html#kanchor4517) | [Open Examples in Notebook](command:idl.notebooks.helpAsNotebook?%7B%22type%22:%22fm%22,%22name%22:%22IDL_String::contains%22%7D)',
8181
'',
8282
'```idl',
83-
'result = IDL_String.contains( [ substring ], $',
84-
' [ /fold_case ])',
83+
';+',
84+
'; :Returns: any',
85+
';+',
86+
'result = IDL_String.contains(substring, $',
87+
' /fold_case)',
8588
'```',
8689
'',
8790
'The IDL\\_String::Contains method determines whether the string contains a given substring.',
8891
'',
92+
'',
8993
'#### Arguments',
9094
'',
9195
'- **substring**: bidirectional, optional, String',
9296
'',
9397
' The string to compare against.',
9498
'',
9599
'',
100+
'',
96101
'#### Keywords',
97102
'',
98103
'- **fold_case**: bidirectional, optional, Boolean',
@@ -106,6 +111,7 @@ describe(`[auto generated] Correctly provides hover help for`, () => {
106111
' None',
107112
'',
108113
'',
114+
'',
109115
'### Examples',
110116
'',
111117
'Determine whether each element of a string array contains a specific substring:',
@@ -121,6 +127,7 @@ describe(`[auto generated] Correctly provides hover help for`, () => {
121127
'1 0 0',
122128
'',
123129
'```',
130+
'',
124131
'### Return Value',
125132
'',
126133
'The result is a boolean value 1 (true) if the string contains the substring, or 0 otherwise. If _var_ is an array then _Result_ is a byte array of the same dimensions.',
@@ -235,32 +242,33 @@ describe(`[auto generated] Correctly provides hover help for`, () => {
235242
'[Open Examples in Notebook](command:idl.notebooks.helpAsNotebook?%7B%22type%22:%22pm%22,%22name%22:%22Plot::save%22%7D)',
236243
'',
237244
'```idl',
238-
'Plot.save, [ filename ], $',
239-
' [ antialias = any ], $',
240-
' [ /append ], $',
241-
' [ /bit_depth ], $',
242-
' [ bitmap = any ], $',
243-
' [ border = any ], $',
244-
' [ /centimeters ], $',
245-
' [ close = any ], $',
246-
' [ /cmyk ], $',
247-
' [ /compression ], $',
248-
' [ height = any ], $',
249-
' [ /landscape ], $',
250-
' [ /memory ], $',
251-
' [ page_size = any ], $',
252-
' [ resolution = any ], $',
253-
' [ /reversible ], $',
254-
' [ transparent = any ], $',
255-
' [ width = any ], $',
256-
' [ xmargin = any ], $',
257-
' [ ymargin = any ]',
245+
'Plot.save, filename, $',
246+
' antialias = value, $',
247+
' /append, $',
248+
' /bit_depth, $',
249+
' bitmap = value, $',
250+
' border = value, $',
251+
' /centimeters, $',
252+
' close = value, $',
253+
' /cmyk, $',
254+
' /compression, $',
255+
' height = value, $',
256+
' /landscape, $',
257+
' /memory, $',
258+
' page_size = value, $',
259+
' resolution = value, $',
260+
' /reversible, $',
261+
' transparent = value, $',
262+
' width = value, $',
263+
' xmargin = value, $',
264+
' ymargin = value',
258265
'```',
259266
'',
260267
'![](https://www.nv5geospatialsoftware.com/docs/html/images/save_method_ex.gif) ',
261268
'',
262269
'The Save method saves the window contents of an IDL Graphic to an image file.',
263270
'',
271+
'',
264272
'#### Arguments',
265273
'',
266274
'- **filename**: bidirectional, optional, String',
@@ -292,6 +300,7 @@ describe(`[auto generated] Correctly provides hover help for`, () => {
292300
' _Note:_ If the APPEND keyword was used in the previous call to the Save method, the _Filename_ will be ignored.',
293301
'',
294302
'',
303+
'',
295304
'#### Keywords',
296305
'',
297306
'- **antialias**: bidirectional, optional, any',
@@ -414,6 +423,7 @@ describe(`[auto generated] Correctly provides hover help for`, () => {
414423
' Set this keyword to the y-offset from the lower-left corner of the page in inches (or centimeters if CENTIMETERS is set). The default behavior is to center the graphics on the page.',
415424
'',
416425
'',
426+
'',
417427
'### Example',
418428
'',
419429
'The following code sample creates a bar plot and saves the image to a PNG file.',
@@ -430,6 +440,7 @@ describe(`[auto generated] Correctly provides hover help for`, () => {
430440
'### Additional Examples',
431441
'',
432442
'See Additional Examples for more code examples using the Save method.',
443+
'',
433444
'### Additional Examples',
434445
'',
435446
'The following example uses three plot graphics to create a multi-page PDF file. Each time we call the Save method we use the /APPEND keyword, and on the last call we add the /CLOSE keyword to clear out the PDF buffer.',

libs/tests/hover-help/src/lib/call-function.1.spec.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,24 @@ describe(`[auto generated] Basic checks for call_function() hover help`, () => {
3232
'[Online Docs](https://www.nv5geospatialsoftware.com/docs/ENVI.html) | [Open Examples in Notebook](command:idl.notebooks.helpAsNotebook?%7B%22type%22:%22f%22,%22name%22:%22envi%22%7D)',
3333
'',
3434
'```idl',
35-
'result = envi( [ /headless ], $',
36-
' [ language = String ], $',
37-
' [ preferences = any ], $',
38-
' [ /current ], $',
39-
' [ error = String ], $',
40-
' [ layout = Array<Number> ], $',
41-
' [ log_file = String ])',
35+
';+',
36+
'; :Returns: ENVI',
37+
';+',
38+
'result = envi( $',
39+
' /headless $',
40+
' language = value $',
41+
' preferences = value $',
42+
' /current $',
43+
' error = value $',
44+
' layout = value $',
45+
' log_file = value)',
4246
'```',
4347
'',
4448
'The ENVI function launches the ENVI application and returns an object reference to the application.',
4549
'',
4650
'_Note:_ The ENVI interface and ENVI Classic interface should not be started within the same IDL session. ',
4751
'',
52+
'',
4853
'#### Keywords',
4954
'',
5055
'- **headless**: in, optional, Boolean',
@@ -86,6 +91,7 @@ describe(`[auto generated] Basic checks for call_function() hover help`, () => {
8691
' ',
8792
'',
8893
'',
94+
'',
8995
'### Example 1',
9096
'',
9197
'Copy and paste the following code into the IDL command line:',
@@ -103,6 +109,7 @@ describe(`[auto generated] Basic checks for call_function() hover help`, () => {
103109
' view = e.getView()',
104110
' layer = view.createLayer(raster)',
105111
'```',
112+
'',
106113
'### Example 2',
107114
'',
108115
'Copy and paste the following code into the IDL command line:',
@@ -136,6 +143,7 @@ describe(`[auto generated] Basic checks for call_function() hover help`, () => {
136143
'```idl',
137144
' e.layout = [1, 1]',
138145
'```',
146+
'',
139147
'### Return Value',
140148
'',
141149
'The ENVI function returns a reference to the ENVI application. Use the returned reference to manipulate the application after creation by changing properties or calling methods.',

libs/tests/hover-help/src/lib/ex-1.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ describe(`[auto generated] Correctly identifies search terms from syntax tree`,
3535
'',
3636
'```idl',
3737
'awesomeRasterIntersection, $',
38-
' [ /debug ], $',
39-
' [ data_ignore_value = Number ], $',
40-
' [ /generate_pixel_state_mask ], $',
41-
' input_raster1 = ENVIRaster, $',
42-
' input_raster2 = ENVIRaster, $',
43-
' [ output_grid_definition = ENVIGridDefinition ], $',
44-
' [ output_raster1_uri = String ], $',
45-
' [ output_raster2_uri = String ], $',
46-
' [ output_mask_raster_uri = String ], $',
47-
' [ resampling = String ]',
38+
' /debug, $',
39+
' data_ignore_value = value, $',
40+
' /generate_pixel_state_mask, $',
41+
' input_raster1 = value, $',
42+
' input_raster2 = value, $',
43+
' output_grid_definition = value, $',
44+
' output_raster1_uri = value, $',
45+
' output_raster2_uri = value, $',
46+
' output_mask_raster_uri = value, $',
47+
' resampling = value',
4848
'```',
4949
'',
5050
'Tool for determining the intersection between two rasters based on their',

libs/tests/hover-help/src/lib/ex-2.spec.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ describe(`[auto generated] Correctly identifies keywords from routine calls`, ()
3232
'[Open Examples in Notebook](command:idl.notebooks.helpAsNotebook?%7B%22type%22:%22f%22,%22name%22:%22myfunc%22%7D)',
3333
'',
3434
'```idl',
35-
'result = myfunc( var1, $',
36-
' [ /kw1 ])',
35+
';+',
36+
'; :Returns: Number',
37+
';+',
38+
'result = myfunc(var1, $',
39+
' /kw1)',
3740
'```',
3841
'',
3942
'My procedure',
@@ -149,8 +152,11 @@ describe(`[auto generated] Correctly identifies keywords from routine calls`, ()
149152
'[Open Examples in Notebook](command:idl.notebooks.helpAsNotebook?%7B%22type%22:%22f%22,%22name%22:%22myfunc%22%7D)',
150153
'',
151154
'```idl',
152-
'result = myfunc( var1, $',
153-
' [ /kw1 ])',
155+
';+',
156+
'; :Returns: Number',
157+
';+',
158+
'result = myfunc(var1, $',
159+
' /kw1)',
154160
'```',
155161
'',
156162
'My procedure',

libs/tests/hover-help/src/lib/init-methods.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ describe(`[auto generated] Verify hover-help for`, () => {
3232
'[Open Examples in Notebook](command:idl.notebooks.helpAsNotebook?%7B%22type%22:%22f%22,%22name%22:%22MyClass%22%7D)',
3333
'',
3434
'```idl',
35-
'result = MyClass.init( [ /kw2 ])',
35+
';+',
36+
'; :Returns: MyClass',
37+
';+',
38+
'result = MyClass( $',
39+
' /kw2)',
3640
'```',
3741
'',
3842
'',

libs/tests/hover-help/src/lib/no-end.spec.ts

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,24 @@ describe(`[auto generated] Correctly does not provide hover help`, () => {
3434
'[Online Docs](https://www.nv5geospatialsoftware.com/docs/PLOT.html) | [Open Examples in Notebook](command:idl.notebooks.helpAsNotebook?%7B%22type%22:%22f%22,%22name%22:%22plot%22%7D)',
3535
'',
3636
'```idl',
37-
'result = plot( [ x ], [ y ], [ format ], [ equation ], $',
38-
' [ axis_style = String ], $',
39-
' [ /buffer ], $',
40-
' [ /current ], $',
41-
' [ /device ], $',
42-
' [ dimensions = any ], $',
43-
' [ layout = any ], $',
44-
' [ location = any ], $',
45-
' [ margin = any ], $',
46-
' [ no_toolbar = any ], $',
47-
' [ nodata = String ], $',
48-
' [ /overplot ], $',
49-
' [ widgets = any ], $',
50-
' [ _extra = any ], $',
51-
' [ /test ])',
37+
';+',
38+
'; :Returns: Plot',
39+
';+',
40+
'result = plot(x, y, format, equation, $',
41+
' axis_style = value, $',
42+
' /buffer, $',
43+
' /current, $',
44+
' /device, $',
45+
' dimensions = value, $',
46+
' layout = value, $',
47+
' location = value, $',
48+
' margin = value, $',
49+
' no_toolbar = value, $',
50+
' nodata = value, $',
51+
' /overplot, $',
52+
' widgets = value, $',
53+
' _extra = value, $',
54+
' /test)',
5255
'```',
5356
'',
5457
'The PLOT function draws a line plot of vector arguments. If one parameter is used, the vector parameter is plotted on the ordinate versus the point number on the abscissa. To plot one vector as a function of another, use two parameters.',
@@ -57,6 +60,7 @@ describe(`[auto generated] Correctly does not provide hover help`, () => {
5760
'',
5861
'![](https://www.nv5geospatialsoftware.com/docs/html/images/plot1_ex.png) ',
5962
'',
63+
'',
6064
'#### Arguments',
6165
'',
6266
'- **x**: bidirectional, optional, any',
@@ -82,6 +86,7 @@ describe(`[auto generated] Correctly does not provide hover help`, () => {
8286
' If the first argument is a string, then it is assumed to represent either an equation of _X_ or the name of an IDL function that accepts an input argument _X_. Setting this argument is the same as setting the EQUATION property. See EQUATION for details.',
8387
'',
8488
'',
89+
'',
8590
'#### Keywords',
8691
'',
8792
'- **axis_style**: bidirectional, optional, String',
@@ -202,6 +207,7 @@ describe(`[auto generated] Correctly does not provide hover help`, () => {
202207
' ',
203208
'',
204209
'',
210+
'',
205211
'### Example',
206212
'',
207213
'The following lines create the plot shown above.',
@@ -224,6 +230,7 @@ describe(`[auto generated] Correctly does not provide hover help`, () => {
224230
'### Additional Examples',
225231
'',
226232
'See [Plot examples](command:idl.docs.openLink?%7B%22link%22:%22IDL_DOCS/../Subsystems/idl/Content/GUInavigation/visualize.htm%22%7D) for additional examples using the PLOT function.',
233+
'',
227234
'### Return Value',
228235
'',
229236
'The PLOT function returns a reference to the created graphic. Use the returned reference to manipulate the graphic after creation by changing properties or calling methods.',

0 commit comments

Comments
 (0)