tests: crypto: aes: use meaningful test names

instead of using numbers, change name to what is actually being testing
to improve reporting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2018-02-17 09:03:58 -06:00 committed by Anas Nashif
parent 10d75d478d
commit 46f0718eb1
2 changed files with 12 additions and 12 deletions

View file

@ -68,7 +68,7 @@ struct kat_table {
/*
* NIST test key schedule.
*/
void test_1(void)
void test_key_chain(void)
{
u32_t result = TC_PASS;
const u8_t nist_key[NUM_OF_NIST_KEYS] = {
@ -108,7 +108,7 @@ void test_1(void)
/*
* NIST test vectors for encryption.
*/
void test_2(void)
void test_vectors(void)
{
int result = TC_PASS;
const u8_t nist_key[NUM_OF_NIST_KEYS] = {
@ -167,7 +167,7 @@ u32_t var_text_test(u32_t r, const u8_t *in, const u8_t *out,
/*
* All NIST tests with fixed key and variable text.
*/
void test_3(void)
void test_fixed_key_variable_text(void)
{
u32_t result = TC_PASS;
const u8_t key[NUM_OF_NIST_KEYS] = {
@ -1113,7 +1113,7 @@ u32_t var_key_test(u32_t r, const u8_t *in, const u8_t *out)
/*
* All NIST tests with variable key and fixed text.
*/
void test_4(void)
void test_variable_key_fixed_text(void)
{
u32_t result = TC_PASS;
const struct kat_table kat_tbl[NUM_OF_FIXED_KEYS] = {

View file

@ -5,18 +5,18 @@
*/
#include <ztest.h>
extern void test_1(void);
extern void test_2(void);
extern void test_3(void);
extern void test_4(void);
extern void test_key_chain(void);
extern void test_vectors(void);
extern void test_fixed_key_variable_text(void);
extern void test_variable_key_fixed_text(void);
/**test case main entry*/
void test_main(void)
{
ztest_test_suite(test_aes_fn,
ztest_unit_test(test_1),
ztest_unit_test(test_2),
ztest_unit_test(test_3),
ztest_unit_test(test_4));
ztest_unit_test(test_key_chain),
ztest_unit_test(test_vectors),
ztest_unit_test(test_fixed_key_variable_text),
ztest_unit_test(test_variable_key_fixed_text));
ztest_run_test_suite(test_aes_fn);
}