Add documentation and minor style changes
Add doxygen style documentation to `mbedtls_test_fail`, `mbedtls_test_skip`,
`mbedtls_test_set_step` and `mbedtls_test_info_reset`. This should make it
easier to understand how the test infrastructure is used.
Also make some minor style changes to meet the coding standards and make it
more obvious that `mbedtls_test_info.step` was being incremented.
Signed-off-by: Chris Jones <christopher.jones@arm.com>
diff --git a/tests/suites/test_suite_asn1parse.function b/tests/suites/test_suite_asn1parse.function
index 21b3ab6..47a4340 100644
--- a/tests/suites/test_suite_asn1parse.function
+++ b/tests/suites/test_suite_asn1parse.function
@@ -594,6 +594,7 @@
unsigned char *p = input->x;
const char *rest = description;
unsigned long n;
+ unsigned int step = 0;
TEST_EQUAL( mbedtls_asn1_get_sequence_of( &p, input->x + input->len,
&head, tag ),
@@ -614,7 +615,7 @@
cur = &head;
while( *rest )
{
- mbedtls_test_set_step( mbedtls_test_info.step + 1 );
+ mbedtls_test_set_step( step );
TEST_ASSERT( cur != NULL );
TEST_EQUAL( cur->buf.tag, tag );
n = strtoul( rest, (char **) &rest, 0 );
@@ -625,6 +626,7 @@
if( *rest )
++rest;
cur = cur->next;
+ ++step;
}
TEST_ASSERT( cur == NULL );
}