Make state tests more readable
@@ -3859,6 +3859,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
psa_aead_abort( &operation );
+ /* ------------------------------------------------------- */
+
operation = psa_aead_operation_init( );
TEST_EQUAL( psa_aead_set_lengths( &operation, additional_data->len,
@@ -3867,6 +3869,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
psa_aead_abort( &operation );
+ /* ------------------------------------------------------- */
+
operation = psa_aead_operation_init( );
TEST_EQUAL( psa_aead_update_ad( &operation, additional_data->x,
@@ -3875,6 +3879,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
psa_aead_abort( &operation );
+ /* ------------------------------------------------------- */
+
operation = psa_aead_operation_init( );
TEST_EQUAL( psa_aead_update( &operation, input_data->x,
@@ -3884,6 +3890,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
psa_aead_abort( &operation );
+ /* ------------------------------------------------------- */
+
operation = psa_aead_operation_init( );
TEST_EQUAL( psa_aead_finish( &operation, final_data,
@@ -3895,6 +3903,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
psa_aead_abort( &operation );
+ /* ------------------------------------------------------- */
+
operation = psa_aead_operation_init( );
TEST_EQUAL( psa_aead_verify( &operation, final_data,
@@ -3917,6 +3927,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
psa_aead_abort( &operation );
+ /* ------------------------------------------------------- */
+
operation = psa_aead_operation_init( );
PSA_ASSERT( psa_aead_decrypt_setup( &operation, key, alg ) );
@@ -3995,6 +4007,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
psa_aead_abort( &operation );
+ /* ------------------------------------------------------- */
+
operation = psa_aead_operation_init( );
PSA_ASSERT( psa_aead_encrypt_setup( &operation, key, alg ) );
@@ -4008,6 +4022,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data,
psa_aead_abort( &operation );
+ /* ------------------------------------------------------- */
+
operation = psa_aead_operation_init( );
PSA_ASSERT( psa_aead_encrypt_setup( &operation, key, alg ) );
