diff options
Diffstat (limited to 'common/tests')
-rw-r--r-- | common/tests/test-constants.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/common/tests/test-constants.c b/common/tests/test-constants.c index 4cd4472..4c2f3eb 100644 --- a/common/tests/test-constants.c +++ b/common/tests/test-constants.c @@ -59,6 +59,10 @@ test_constants (CuTest *tc) p11_constant_keys, p11_constant_asserts, p11_constant_categories, + p11_constant_mechanisms, + p11_constant_users, + p11_constant_states, + p11_constant_returns, NULL }; @@ -74,16 +78,20 @@ test_constants (CuTest *tc) } } for (i = 0; constant[i].value != CKA_INVALID; i++) { - CuAssertPtrNotNull (tc, constant[i].nick); CuAssertPtrNotNull (tc, constant[i].name); - CuAssertStrEquals (tc, constant[i].nick, - p11_constant_nick (constant, constant[i].value)); + if (constant[i].nick) { + CuAssertStrEquals (tc, constant[i].nick, + p11_constant_nick (constant, constant[i].value)); + } + CuAssertStrEquals (tc, constant[i].name, p11_constant_name (constant, constant[i].value)); - check = p11_constant_resolve (nicks, constant[i].nick); - CuAssertIntEquals (tc, constant[i].value, check); + if (constant[i].nick) { + check = p11_constant_resolve (nicks, constant[i].nick); + CuAssertIntEquals (tc, constant[i].value, check); + } check = p11_constant_resolve (names, constant[i].name); CuAssertIntEquals (tc, constant[i].value, check); |