Add self tests (taken from #1549).

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
diff --git a/programs/test/selftest.c b/programs/test/selftest.c
index 0c40686..b91bd07 100644
--- a/programs/test/selftest.c
+++ b/programs/test/selftest.c
@@ -33,6 +33,7 @@
 #include "mbedtls/sha1.h"
 #include "mbedtls/sha256.h"
 #include "mbedtls/sha512.h"
+#include "mbedtls/sha3.h"
 #include "mbedtls/des.h"
 #include "mbedtls/aes.h"
 #include "mbedtls/camellia.h"
@@ -265,6 +266,9 @@
 #if defined(MBEDTLS_SHA512_C)
     {"sha512", mbedtls_sha512_self_test},
 #endif
+#if defined(MBEDTLS_SHA3_C)
+    {"sha3", mbedtls_sha3_self_test},
+#endif
 #if defined(MBEDTLS_DES_C)
     {"des", mbedtls_des_self_test},
 #endif