summaryrefslogtreecommitdiff
path: root/tests/utils.h
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-10-13 12:04:20 +0200
committerTim Rühsen <tim.ruehsen@gmx.de>2019-10-15 14:51:37 +0200
commitd6ee45fe1cf6715bb728e21bd7ac6c0e9d33d2a8 (patch)
tree033a70c15916dace1c6bf085ae7497de97a31f3f /tests/utils.h
parent21883fcb90dd35a2c4d8e8a005802667615fd345 (diff)
downloadgnutls-d6ee45fe1cf6715bb728e21bd7ac6c0e9d33d2a8.tar.gz
tests/buffer.c: Add unit test for _gnutls_buffer_unescape()
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
Diffstat (limited to 'tests/utils.h')
-rw-r--r--tests/utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/utils.h b/tests/utils.h
index e36e4f3b6b..61d6dc9f9e 100644
--- a/tests/utils.h
+++ b/tests/utils.h
@@ -49,6 +49,9 @@
# define FALLTHROUGH
#endif
+/* number of elements within an array */
+#define countof(a) (sizeof(a)/sizeof(*(a)))
+
inline static int global_init(void)
{
#ifdef ENABLE_PKCS11