From b73f4ef126bdead47262e29e47d159a89984d65f Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 19 Feb 2013 14:05:34 +0100 Subject: Add the log-calls module config option If 'log-calls = yes' is set then all the PKCS#11 modules are logged to stderr. --- common/tests/test-constants.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'common/tests') 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); -- cgit v1.1