]> granicus.if.org Git - p11-kit/commitdiff
mock: Minor testing tweaks to mock testing
authorStef Walter <stef@thewalter.net>
Wed, 9 Oct 2013 21:25:03 +0000 (23:25 +0200)
committerStef Walter <stef@thewalter.net>
Tue, 8 Jul 2014 06:57:31 +0000 (08:57 +0200)
p11-kit/tests/test-mock.c

index 079ff0d6aefafec53c89108244820796a66d47c5..8454f1fa7a375c3eafe220bbedda263f9f6f04ab 100644 (file)
@@ -40,7 +40,6 @@
 #include "p11-kit.h"
 
 #include <sys/types.h>
-#include <assert.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -224,7 +223,7 @@ test_get_mechanism_info (void)
        module = setup_mock_module (NULL);
 
        rv = (module->C_GetMechanismInfo) (MOCK_SLOT_ONE_ID, CKM_MOCK_CAPITALIZE, &info);
-       assert (rv == CKR_OK);
+       assert_num_eq (rv, CKR_OK);
        assert_num_eq (512, info.ulMinKeySize);
        assert_num_eq (4096, info.ulMaxKeySize);
        assert_num_eq (CKF_ENCRYPT | CKF_DECRYPT, info.flags);
@@ -1641,6 +1640,7 @@ test_random (void)
 static void
 test_mock_add_tests (const char *prefix)
 {
+       p11_fixture (NULL, NULL);
        p11_test (test_get_info, "%s/test_get_info", prefix);
        p11_test (test_get_slot_list, "%s/test_get_slot_list", prefix);
        p11_test (test_get_slot_info, "%s/test_get_slot_info", prefix);