summaryrefslogtreecommitdiff
path: root/common/tests
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-02-19 14:05:34 +0100
committerStef Walter <stefw@gnome.org>2013-05-21 10:47:53 +0200
commitb73f4ef126bdead47262e29e47d159a89984d65f (patch)
tree0a7f7324ecca62dc7f252be87cd46948e44e8725 /common/tests
parenta14ff781ebf231daa99990fd65c2312f26db93a8 (diff)
Add the log-calls module config option
If 'log-calls = yes' is set then all the PKCS#11 modules are logged to stderr.
Diffstat (limited to 'common/tests')
-rw-r--r--common/tests/test-constants.c18
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);