diff options
Diffstat (limited to 'src/lib/util/test_common_allocation.c')
-rw-r--r-- | src/lib/util/test_common_allocation.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/lib/util/test_common_allocation.c b/src/lib/util/test_common_allocation.c index d4cc4bb58..a85aeccab 100644 --- a/src/lib/util/test_common_allocation.c +++ b/src/lib/util/test_common_allocation.c | |||
@@ -32,8 +32,6 @@ check (void) | |||
32 | { | 32 | { |
33 | #define MAX_TESTVAL 1024 | 33 | #define MAX_TESTVAL 1024 |
34 | char *ptrs[MAX_TESTVAL]; | 34 | char *ptrs[MAX_TESTVAL]; |
35 | unsigned int **a2; | ||
36 | char ***a3; | ||
37 | char *tmp; | 35 | char *tmp; |
38 | int i; | 36 | int i; |
39 | int j; | 37 | int j; |
@@ -98,40 +96,6 @@ check (void) | |||
98 | if (ptrs[0] != NULL) | 96 | if (ptrs[0] != NULL) |
99 | return 9; | 97 | return 9; |
100 | 98 | ||
101 | /* GNUNET_new_array_2d tests */ | ||
102 | a2 = GNUNET_new_array_2d (17, 22, unsigned int); | ||
103 | for (i = 0; i < 17; i++) | ||
104 | { | ||
105 | for (j = 0; j < 22; j++) | ||
106 | { | ||
107 | if (0 != a2[i][j]) | ||
108 | { | ||
109 | GNUNET_free (a2); | ||
110 | return 10; | ||
111 | } | ||
112 | a2[i][j] = i * 100 + j; | ||
113 | } | ||
114 | } | ||
115 | GNUNET_free (a2); | ||
116 | |||
117 | /* GNUNET_new_array_3d tests */ | ||
118 | a3 = GNUNET_new_array_3d (2, 3, 4, char); | ||
119 | for (i = 0; i < 2; i++) | ||
120 | { | ||
121 | for (j = 0; j < 3; j++) | ||
122 | { | ||
123 | for (k = 0; k < 4; k++) | ||
124 | { | ||
125 | if (0 != a3[i][j][k]) | ||
126 | { | ||
127 | GNUNET_free (a3); | ||
128 | return 11; | ||
129 | } | ||
130 | a3[i][j][k] = i * 100 + j * 10 + k; | ||
131 | } | ||
132 | } | ||
133 | } | ||
134 | GNUNET_free (a3); | ||
135 | return 0; | 99 | return 0; |
136 | } | 100 | } |
137 | 101 | ||