Fix typos, comments, style, optimize macros

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/tests/src/psa_exercise_key.c b/tests/src/psa_exercise_key.c
index dc7c971..61fc845 100644
--- a/tests/src/psa_exercise_key.c
+++ b/tests/src/psa_exercise_key.c
@@ -791,7 +791,10 @@
         }
     } else
     if (PSA_KEY_TYPE_IS_DH_PUBLIC_KEY(type) || PSA_KEY_TYPE_IS_DH_KEY_PAIR(type)) {
-        TEST_LE_U(exported_length, PSA_BITS_TO_BYTES(bits));
+        TEST_ASSERT(exported_length <=
+                    PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE(type, bits));
+        TEST_ASSERT(exported_length <=
+                    PSA_EXPORT_PUBLIC_KEY_MAX_SIZE);
     } else {
         (void) exported;
         TEST_ASSERT(!"Sanity check not implemented for this key type");