GetTestDescription
Description
GetTestDescription returns the description or the name of the test. This description appears in the Graphical User Interface (GUI) and in the report.
Syntax
int GetTestDescription(const unsigned int iunTestIndex, wchar_t*& owszDescription);
Parameters
Input
iunTestIndex: the identification number of the test returned the description.
Output
owszDescription: the description of the test identified by the number "iunTestIndex".
Note: To write the owszDescription in Japanese on an English operating system, convert the Japanese string in unicode characters. For example: gvTests[0].Description = L"日本語"; becomes gvTests[0].Description = L"\u65E5\u672C\u8A9E";
Return
(int): returns the identification number of the error if an error occurs or 0 if no error occurs.
Example
To get a full example of the API use, download the .Plugin
#define OPT_PLUGIN_NO_ERROR 0
#define OPT_PLUGIN_ERROR_UNKNOWN_TEST 3
std::map<int, std::wstring> gmTestDescription;
gmTestDescription[0] = L"Virtual Image Distance";
gmTestDescription[1] = L"Look Down Angle";
gmTestDescritpion[2] = L"Look Over Angle";
int GetTestDescription(const unsigned int iunTestIndex, wchar_t*& owszDescription)
{
if (iunTestIndex < gmTestDescription.size())
{
owszDescription = const_cast<wchar_t*>(gmTestDescription[iunTestIndex].c_str());
}
else
{
return OPT_PLUGIN_ERROR_UNKNOWN_TEST;
}
return OPT_PLUGIN_NO_ERROR;
}