Skip to content

Commit 1b357e3

Browse files
committed
Tests: Check that all our analysis functions have help strings
1 parent 5b316f5 commit 1b357e3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Packages/Testing-MIES/UTF_AnalysisFunctionManagement.ipf

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,29 @@ static Function EnsureCorrectUserAnalysis()
311311
REQUIRE_EQUAL_VAR(ItemsInList(FunctionList("InvalidSignature", ";", "WIN:UserAnalysisFunctions.ipf")), 1)
312312
End
313313

314+
Function CheckHelpStringsOfAllAnalysisFunctions()
315+
string funcs, genericFunc, params, names, name, help
316+
variable i, j, numFuncs, numParams
317+
318+
funcs = WBP_GetAnalysisFunctions(ANALYSIS_FUNCTION_VERSION_V3)
319+
// remove our test help functions which do nasty things
320+
funcs = GrepList(funcs, "Params[[:digit:]]*_V3", 1)
321+
322+
numFuncs = ItemsInList(funcs)
323+
for(i = 0; i < numFuncs; i += 1)
324+
genericFunc = StringFromList(i, funcs)
325+
params = AFH_GetListOfAnalysisParams(genericFunc, REQUIRED_PARAMS | OPTIONAL_PARAMS)
326+
327+
names = AFH_GetListOfAnalysisParamNames(params)
328+
numParams = ItemsInList(names)
329+
for(j = 0; j < numParams; j += 1)
330+
name = StringFromList(j, names)
331+
help = AFH_GetHelpForAnalysisParameter(genericFunc, name)
332+
CHECK_PROPER_STR(help)
333+
endfor
334+
endfor
335+
End
336+
314337
// invalid analysis functions
315338
// UTF_TD_GENERATOR HardwareMain#DeviceNameGeneratorMD1
316339
static Function AFT1([str])

0 commit comments

Comments
 (0)