]> pd.if.org Git - liblfds/blob - liblfds/liblfds7.0.0/test/src/test_lfds700_hash_addonly_alignment.c
Initial import (all versions, including the new 7.1.0)
[liblfds] / liblfds / liblfds7.0.0 / test / src / test_lfds700_hash_addonly_alignment.c
1 /***** includes *****/
2 #include "internal.h"
3
4
5
6
7
8 /****************************************************************************/
9 #pragma warning( disable : 4127 ) // TRD : disables MSVC warning for condition expressions being const
10
11 void test_lfds700_hash_a_alignment()
12 {
13   enum lfds700_misc_validity
14     dvs = LFDS700_MISC_VALIDITY_VALID;
15
16   /* TRD : these are compile time checks
17            but we do them here because this is a test programme
18            and it should indicate issues to users when it is *run*,
19            not when it is compiled, because a compile error normally
20            indicates a problem with the code itself and so is misleading
21   */
22
23   internal_display_test_name( "Alignment" );
24
25
26
27   // TRD : struct lfds700_hash_a_element
28   if( offsetof(struct lfds700_hash_a_element,value) % LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES != 0 )
29     dvs = LFDS700_MISC_VALIDITY_INVALID_TEST_DATA;
30
31
32
33   // TRD : print the test result
34   internal_display_test_result( 1, "freelist", dvs );
35
36   return;
37 }
38
39 #pragma warning( default : 4127 )
40