Function Docs

Function Docs are a way of commenting a function to provide metadata on the function to the system. Some of this metadata can later be used to help in setting up a project in XJDeveloper, while other metadata is used to provide information about a test for use in the Test Summary Report.

A Function Doc entry is defined by a block of text in triple-slash comments directly before a function and is made up of an optional function summary followed by a series of tags. These tags contain the metadata which can accelerate the project setup.

The following tags can be used to provide extra metadata for a function:

Summary
Any text not preceded by a tag inside the triple slash comment is used to provide a summary of the functionality of the test.
@devices
Lists devices that a test function is responsible for testing.
@param
Documents a parameter of the function.
@testfunction
Marks a function as a test function so it is automatically added to the XJRunner test list.

Example

/// This function tests IC9 using data from a specified file.
///
/// @devices IC9
///
/// @testfunction defaultenabled @groupname Custom Tests
///
/// @param dataFile @filename This is a filename which specifies the file to write.
/// @param result Returns RESULT_PASS on success.
///
GLOBAL TestIC9(STRING dataFile)(INT result)
  // ...
END;