sol()
Returns an instance of the class sol
;+
; :Returns: sol
;-
result = sol(dir, $
_ref_extra = value, $
config_file = value, $
/config_path_full, $
test_files = value, $
test_source = value)Init method for the Sol test runner. Locates the test files and the source files to check for code coverage using the options in an idltest.json configuration file (see sol_config). Without a configuration file, all .spec.pro files in dir are run.
Examples
Sol is the test runner. Create it in a file next to idltest.json, run the specs it finds, and write the summary. Each spec file then creates a luna object, which holds suites (luna.suite), tests (suite.test), and expectations (test.expects):
; create the runner (uses idltest.json in this file's folder)
s = sol()
; run every spec file and print/write the summary
passed = s.runTests()
s.generateTestSummary
; or run only the specs whose path contains 'strings'
passed = s.runTests(filter = 'strings')Arguments
dir
optionalinputtype=StringSpecify the directory that contains the test files. If not specified, the directory of the file that created the object is used.
Keywords
_ref_extra {#kw-_ref_extra}
optionalinputtype=anyAny other object properties can be specified as keywords and are set on the object upon creation. If any are specified, the quiet, verbose, and debug options in the configuration file are ignored.
config_file
optionalinputtype=StringSpecify the name or path of an idltest.json file. If not specified, idltest.json in dir is used if it exists.
config_path_full
optionalinputtype=BooleanSet this keyword if CONFIG_FILE is a fully-qualified path instead of a path relative to the file that called this routine.
test_files
optionalinputtype=Array<String>Specify the test files to run instead of searching dir.
test_source
optionalinputtype=Array<String>Specify the source files to use for code coverage.