Hardware Reference
In-Depth Information
ATS_begin
This is the function signature for ATS_begin :
void ATS_begin( char *manufName , char *testSuiteName );
Here are some examples of its usage:
ATS_begin("Arduino","My test suite.");
ATS_begin("Teensy", "My test suite.");
ATS_begin("Adafruit Motor Shield", "My motor shield tests.");
These are all valid examples of beginning statements. You can set the manufacturer of the board or shield and
test the suite name. The ATS_begin function initializes the serial interface so that you do not have to do this in your
test sketches. Once the test starts, it keeps track of the time and other summary test information, such as number of
failures.
ATS_PrintTestStatus
You use the test status to return the test result to the user. Here is the syntax of the ATS_PrintTestStatus function:
void ATS_PrintTestStatus( char *testString , boolean passed );
And here are some examples of its usage:
ATS_PrintTestStatus("1. Test result is TRUE test" , true);
ATS_PrintTestStatus("2. Test result is FALSE test (a false result is expected)" , false);
In the function, the argument test name is followed by a Boolean test result ( true or false ). All tests must pass or
fail. You can use a parentheses section to add a note about the test to clarify detail, if necessary. In the FALSE test case,
we must say that failure is expected, since we want to see the failure case. This is an unusual case so it's important to
note it because interpreting the result could cause confusion.
Numbering is not automatic, so if you want to number your tests, put the numbering in the test name, like so:
ATS_PrintTestsStatus("1. my numbered test" , status);
ATS_end
ATS_end completes the test run. Test time and the final count of successful and failed tests are sent in the summary
format to the serial port.
void ATS_end();
 
Search WWH ::




Custom Search