diff options
author | Stef Walter <stefw@gnome.org> | 2013-01-02 16:52:59 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-02-05 14:54:53 +0100 |
commit | 3b482acc47ba971406db526ebddf589ad1a8f16e (patch) | |
tree | c78cf201fa5e855e4cc864f30e8bece4840f11a6 /trust/tests/test-parser.c | |
parent | e46c74aef6eee7da3cdfb17077905811b9e04a61 (diff) |
Better debugging and checks for attribute values
Diffstat (limited to 'trust/tests/test-parser.c')
-rw-r--r-- | trust/tests/test-parser.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/trust/tests/test-parser.c b/trust/tests/test-parser.c index 132d551..3ef979b 100644 --- a/trust/tests/test-parser.c +++ b/trust/tests/test-parser.c @@ -177,7 +177,7 @@ test_parse_openssl_trusted (CuTest *cu) CuAssertPtrEquals (cu, NULL, attr); attrs = test.objects->elem[1]; - CuAssertTrue (cu, p11_attrs_match (attrs, expected)); + test_check_attrs (cu, expected, attrs); teardown (cu); } @@ -200,7 +200,9 @@ static void test_parse_anchor (CuTest *cu) { CK_ATTRIBUTE *attrs; - CK_BBOOL val; + CK_ATTRIBUTE *attr; + CK_BBOOL vtrue = CK_TRUE; + CK_ATTRIBUTE trusted = { CKA_TRUSTED, &vtrue, sizeof (vtrue) }; int ret; setup (cu); @@ -215,9 +217,8 @@ test_parse_anchor (CuTest *cu) attrs = test.objects->elem[0]; test_check_cacert3_ca (cu, attrs, NULL); - if (!p11_attrs_find_bool (attrs, CKA_TRUSTED, &val)) - CuFail (cu, "missing CKA_TRUSTED"); - CuAssertIntEquals (cu, CK_TRUE, val); + attr = p11_attrs_find (attrs, CKA_TRUSTED); + test_check_attr (cu, &trusted, attr); teardown (cu); } |