EVP_Digest*: enable SHA3 pre-hashing for DSA
[openssl.git] / test / sparse_array_test.c
index fa57f3fc0e576e9f668651b3ddf5dbb2d4b659d3..3457a7775f7fefb8d83344924bfb832c307c9d2b 100644 (file)
@@ -30,11 +30,11 @@ DEFINE_SPARSE_ARRAY_OF(char);
 static int test_sparse_array(void)
 {
     static const struct {
-        size_t n;
+        ossl_uintmax_t n;
         char *v;
     } cases[] = {
         { 22, "a" }, { 0, "z" }, { 1, "b" }, { 290, "c" },
-        { INT_MAX, "m" }, { 6666666, "d" }, { (size_t)-1, "H" },
+        { INT_MAX, "m" }, { 6666666, "d" }, { (ossl_uintmax_t)-1, "H" },
         { 99, "e" }
     };
     SPARSE_ARRAY_OF(char) *sa;
@@ -69,7 +69,7 @@ static int test_sparse_array_num(void)
 {
     static const struct {
         size_t num;
-        size_t n;
+        ossl_uintmax_t n;
         char *v;
     } cases[] = {
         { 1, 22, "a" }, { 2, 1021, "b" }, { 3, 3, "c" }, { 2, 22, NULL },
@@ -96,7 +96,7 @@ err:
 }
 
 struct index_cases_st {
-    size_t n;
+    ossl_uintmax_t n;
     char *v;
     int del;
 };
@@ -109,7 +109,7 @@ struct doall_st {
     int all;
 };
 
-static void leaf_check_all(size_t n, char *value, void *arg)
+static void leaf_check_all(ossl_uintmax_t n, char *value, void *arg)
 {
     struct doall_st *doall_data = (struct doall_st *)arg;
     const struct index_cases_st *cases = doall_data->cases;
@@ -125,7 +125,7 @@ static void leaf_check_all(size_t n, char *value, void *arg)
     TEST_error("Index %zu with value %s not found", n, value);
 }
 
-static void leaf_delete(size_t n, char *value, void *arg)
+static void leaf_delete(ossl_uintmax_t n, char *value, void *arg)
 {
     struct doall_st *doall_data = (struct doall_st *)arg;
     const struct index_cases_st *cases = doall_data->cases;
@@ -145,8 +145,8 @@ static int test_sparse_array_doall(void)
 {
     static const struct index_cases_st cases[] = {
         { 22, "A", 1 }, { 1021, "b", 0 }, { 3, "c", 0 }, { INT_MAX, "d", 1 },
-        { (size_t)-1, "H", 0 }, { (size_t)-2, "i", 1 }, { 666666666, "s", 1 },
-        { 1234567890, "t", 0 },
+        { (ossl_uintmax_t)-1, "H", 0 }, { (ossl_uintmax_t)-2, "i", 1 },
+        { 666666666, "s", 1 }, { 1234567890, "t", 0 },
     };
     struct doall_st doall_data;
     size_t i;
@@ -164,7 +164,7 @@ static int test_sparse_array_doall(void)
             TEST_note("failed at iteration %zu", i + 1);
             goto err;
     }
-    
+
     ossl_sa_char_doall_arg(sa, &leaf_check_all, &doall_data);
     if (doall_data.res == 0) {
         TEST_info("while checking all elements");