Move the assertion

Move the assertion for checking the heap allocatino succeeded.
diff --git a/tests/suites/test_suite_nist_kw.function b/tests/suites/test_suite_nist_kw.function
index ff5bb8b..5d0cd80 100644
--- a/tests/suites/test_suite_nist_kw.function
+++ b/tests/suites/test_suite_nist_kw.function
@@ -161,14 +161,14 @@
     if( in_len != 0 )
     {
         plaintext = mbedtls_calloc( 1, in_len );
+        TEST_ASSERT( plaintext != NULL );
     }
-    TEST_ASSERT( in_len == 0 || plaintext != NULL );
 
     if( out_len != 0 )
     {
         ciphertext = mbedtls_calloc( 1, output_len );
+    TEST_ASSERT( ciphertext != NULL );
     }
-    TEST_ASSERT( out_len == 0 || ciphertext != NULL );
 
     memset( plaintext, 0, in_len );
     memset( ciphertext, 0, output_len );
@@ -217,13 +217,13 @@
     if( out_len != 0 )
     {
         plaintext = mbedtls_calloc( 1, output_len );
+        TEST_ASSERT( plaintext != NULL );
     }
-    TEST_ASSERT( out_len == 0 || plaintext != NULL );
     if( in_len != 0 )
     {
         ciphertext = mbedtls_calloc( 1, in_len );
+        TEST_ASSERT( ciphertext != NULL );
     }
-    TEST_ASSERT( in_len == 0 || ciphertext != NULL );
 
     memset( plaintext, 0, output_len );
     memset( ciphertext, 0, in_len );