ReactOS  0.4.15-dev-1384-g878186b
generated.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wtypes.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/test.h"
Include dependency graph for generated.c:

Go to the source code of this file.

Macros

#define WINE_NOWINSOCK
 
#define DWORD_PTR   UINT_PTR
 
#define LONG_PTR   INT_PTR
 
#define ULONG_PTR   UINT_PTR
 
#define TEST_TYPE_SIZE(type, size)   C_ASSERT(sizeof(type) == size);
 
#define TEST_TYPE_ALIGN(type, align)
 
#define TEST_TARGET_ALIGN(type, align)
 
#define TEST_FIELD_ALIGN(type, field, align)
 
#define TEST_FIELD_OFFSET(type, field, offset)   C_ASSERT(FIELD_OFFSET(type, field) == offset);
 
#define TEST_TARGET_SIZE(type, size)   TEST_TYPE_SIZE(*(type)0, size)
 
#define TEST_FIELD_SIZE(type, field, size)   TEST_TYPE_SIZE((((type*)0)->field), size)
 
#define TEST_TYPE_SIGNED(type)   C_ASSERT((type) -1 < 0);
 
#define TEST_TYPE_UNSIGNED(type)   C_ASSERT((type) -1 > 0);
 

Functions

static void test_pack_ASSOCF (void)
 
static void test_pack_DLLGETVERSIONPROC (void)
 
static void test_pack_DLLVERSIONINFO (void)
 
static void test_pack_DLLVERSIONINFO2 (void)
 
static void test_pack_HUSKEY (void)
 
static void test_pack_PHUSKEY (void)
 
static void test_pack (void)
 
 START_TEST (generated)
 

Macro Definition Documentation

◆ DWORD_PTR

Definition at line 23 of file generated.c.

◆ LONG_PTR

Definition at line 24 of file generated.c.

◆ TEST_FIELD_ALIGN

#define TEST_FIELD_ALIGN (   type,
  field,
  align 
)

Definition at line 68 of file generated.c.

◆ TEST_FIELD_OFFSET

#define TEST_FIELD_OFFSET (   type,
  field,
  offset 
)    C_ASSERT(FIELD_OFFSET(type, field) == offset);

Definition at line 71 of file generated.c.

◆ TEST_FIELD_SIZE

#define TEST_FIELD_SIZE (   type,
  field,
  size 
)    TEST_TYPE_SIZE((((type*)0)->field), size)

Definition at line 74 of file generated.c.

◆ TEST_TARGET_ALIGN

#define TEST_TARGET_ALIGN (   type,
  align 
)

Definition at line 67 of file generated.c.

◆ TEST_TARGET_SIZE

#define TEST_TARGET_SIZE (   type,
  size 
)    TEST_TYPE_SIZE(*(type)0, size)

Definition at line 73 of file generated.c.

◆ TEST_TYPE_ALIGN

#define TEST_TYPE_ALIGN (   type,
  align 
)

Definition at line 60 of file generated.c.

◆ TEST_TYPE_SIGNED

#define TEST_TYPE_SIGNED (   type)    C_ASSERT((type) -1 < 0);

Definition at line 75 of file generated.c.

◆ TEST_TYPE_SIZE

#define TEST_TYPE_SIZE (   type,
  size 
)    C_ASSERT(sizeof(type) == size);

Definition at line 55 of file generated.c.

◆ TEST_TYPE_UNSIGNED

#define TEST_TYPE_UNSIGNED (   type)    C_ASSERT((type) -1 > 0);

Definition at line 76 of file generated.c.

◆ ULONG_PTR

Definition at line 25 of file generated.c.

◆ WINE_NOWINSOCK

#define WINE_NOWINSOCK

Definition at line 8 of file generated.c.

Function Documentation

◆ START_TEST()

START_TEST ( generated  )

Definition at line 233 of file generated.c.

234 {
235  test_pack();
236 }
static void test_pack(void)
Definition: generated.c:223

◆ test_pack()

static void test_pack ( void  )
static

Definition at line 223 of file generated.c.

224 {
231 }
static void test_pack_PHUSKEY(void)
Definition: generated.c:212
static void test_pack_DLLVERSIONINFO(void)
Definition: generated.c:167
static void test_pack_DLLVERSIONINFO2(void)
Definition: generated.c:189
static void test_pack_ASSOCF(void)
Definition: generated.c:152
static void test_pack_HUSKEY(void)
Definition: generated.c:205
static void test_pack_DLLGETVERSIONPROC(void)
Definition: generated.c:160

Referenced by START_TEST().

◆ test_pack_ASSOCF()

static void test_pack_ASSOCF ( void  )
static

Definition at line 152 of file generated.c.

153 {
154  /* ASSOCF */
158 }
#define TEST_TYPE_UNSIGNED(type)
Definition: generated.c:76
#define TEST_TYPE_SIZE(type, size)
Definition: generated.c:55
#define TEST_TYPE_ALIGN(type, align)
Definition: generated.c:60
DWORD ASSOCF
Definition: shlwapi.h:599

Referenced by test_pack().

◆ test_pack_DLLGETVERSIONPROC()

static void test_pack_DLLGETVERSIONPROC ( void  )
static

Definition at line 160 of file generated.c.

161 {
162  /* DLLGETVERSIONPROC */
165 }
#define TEST_TYPE_SIZE(type, size)
Definition: generated.c:55
HRESULT(CALLBACK * DLLGETVERSIONPROC)(DLLVERSIONINFO *)
Definition: shlwapi.h:1964
#define TEST_TYPE_ALIGN(type, align)
Definition: generated.c:60

Referenced by test_pack().

◆ test_pack_DLLVERSIONINFO()

static void test_pack_DLLVERSIONINFO ( void  )
static

Definition at line 167 of file generated.c.

168 {
169  /* DLLVERSIONINFO (pack 8) */
172  TEST_FIELD_SIZE (DLLVERSIONINFO, cbSize, 4)
173  TEST_FIELD_ALIGN (DLLVERSIONINFO, cbSize, 4)
175  TEST_FIELD_SIZE (DLLVERSIONINFO, dwMajorVersion, 4)
176  TEST_FIELD_ALIGN (DLLVERSIONINFO, dwMajorVersion, 4)
177  TEST_FIELD_OFFSET(DLLVERSIONINFO, dwMajorVersion, 4)
178  TEST_FIELD_SIZE (DLLVERSIONINFO, dwMinorVersion, 4)
179  TEST_FIELD_ALIGN (DLLVERSIONINFO, dwMinorVersion, 4)
180  TEST_FIELD_OFFSET(DLLVERSIONINFO, dwMinorVersion, 8)
181  TEST_FIELD_SIZE (DLLVERSIONINFO, dwBuildNumber, 4)
182  TEST_FIELD_ALIGN (DLLVERSIONINFO, dwBuildNumber, 4)
183  TEST_FIELD_OFFSET(DLLVERSIONINFO, dwBuildNumber, 12)
184  TEST_FIELD_SIZE (DLLVERSIONINFO, dwPlatformID, 4)
185  TEST_FIELD_ALIGN (DLLVERSIONINFO, dwPlatformID, 4)
186  TEST_FIELD_OFFSET(DLLVERSIONINFO, dwPlatformID, 16)
187 }
#define TEST_FIELD_ALIGN(type, field, align)
Definition: generated.c:68
#define TEST_TYPE_SIZE(type, size)
Definition: generated.c:55
#define TEST_TYPE_ALIGN(type, align)
Definition: generated.c:60
#define TEST_FIELD_SIZE(type, field, size)
Definition: generated.c:74
#define TEST_FIELD_OFFSET(type, field, offset)
Definition: generated.c:71

Referenced by test_pack().

◆ test_pack_DLLVERSIONINFO2()

static void test_pack_DLLVERSIONINFO2 ( void  )
static

Definition at line 189 of file generated.c.

190 {
191  /* DLLVERSIONINFO2 (pack 8) */
194  TEST_FIELD_SIZE (DLLVERSIONINFO2, info1, 20)
200  TEST_FIELD_SIZE (DLLVERSIONINFO2, ullVersion, 8)
201  TEST_FIELD_ALIGN (DLLVERSIONINFO2, ullVersion, 8)
202  TEST_FIELD_OFFSET(DLLVERSIONINFO2, ullVersion, 24)
203 }
#define TEST_FIELD_ALIGN(type, field, align)
Definition: generated.c:68
#define TEST_TYPE_SIZE(type, size)
Definition: generated.c:55
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define TEST_TYPE_ALIGN(type, align)
Definition: generated.c:60
#define TEST_FIELD_SIZE(type, field, size)
Definition: generated.c:74
#define TEST_FIELD_OFFSET(type, field, offset)
Definition: generated.c:71

Referenced by test_pack().

◆ test_pack_HUSKEY()

static void test_pack_HUSKEY ( void  )
static

Definition at line 205 of file generated.c.

206 {
207  /* HUSKEY */
210 }
#define TEST_TYPE_SIZE(type, size)
Definition: generated.c:55
#define TEST_TYPE_ALIGN(type, align)
Definition: generated.c:60

Referenced by test_pack().

◆ test_pack_PHUSKEY()

static void test_pack_PHUSKEY ( void  )
static

Definition at line 212 of file generated.c.

213 {
214  /* PHUSKEY */
219 }
#define TEST_TARGET_ALIGN(type, align)
Definition: generated.c:67
#define TEST_TYPE_SIZE(type, size)
Definition: generated.c:55
#define TEST_TARGET_SIZE(type, size)
Definition: generated.c:73
#define TEST_TYPE_ALIGN(type, align)
Definition: generated.c:60

Referenced by test_pack().