aboutsummaryrefslogtreecommitdiff
path: root/test_crypto.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-06-20 00:36:18 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-06-20 00:36:18 +0200
commit65775f8276b082a18c99cb75c11193685bd5d822 (patch)
tree626229703ecafef6ce509584582f2e3b181f5bab /test_crypto.c
parent8e44164facc215a09984d83f488345f548753477 (diff)
add 3dim array helpers
Diffstat (limited to 'test_crypto.c')
-rw-r--r--test_crypto.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/test_crypto.c b/test_crypto.c
index 6d4a029..a9acdde 100644
--- a/test_crypto.c
+++ b/test_crypto.c
@@ -47,6 +47,27 @@ test_smc_2d_array ()
int
+test_smc_3d_array ()
+{
+ gcry_mpi_point_t ***array;
+ uint16_t size1 = 3;
+ uint16_t size2 = 7;
+ uint16_t size3 = 11;
+ uint16_t i, j, k;
+
+ array = smc_init3 (size1, size2, size3);
+ check (array, "memory allocation failed");
+
+ for (i = 0; i < size1; i++)
+ for (j = 0; j < size2; j++)
+ for (k = 0; k < size3; k++)
+ check (array[i][j][k], "point has not been initialized");
+
+ smc_free3 (array, size1, size2, size3);
+}
+
+
+int
test_smc_zkp_dl ()
{
gcry_mpi_t c = gcry_mpi_new (0);
@@ -185,6 +206,7 @@ main (int argc, char *argv[])
/* tests that need to run only once */
run (test_smc_2d_array);
+ run (test_smc_3d_array);
for (tests_run = 0; tests_run < repeat; tests_run++)
{