include: Make ARRAY_SIZE() available in wine/test.h.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
df6b7324df
commit
7b5668a6e7
|
@ -27,8 +27,6 @@
|
|||
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
static BOOL (WINAPI *pCredDeleteA)(LPCSTR,DWORD,DWORD);
|
||||
static BOOL (WINAPI *pCredEnumerateA)(LPCSTR,DWORD,DWORD *,PCREDENTIALA **);
|
||||
static VOID (WINAPI *pCredFree)(PVOID);
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
static BOOL (WINAPI *pCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*);
|
||||
static BOOL (WINAPI *pGetEventLogInformation)(HANDLE,DWORD,LPVOID,DWORD,LPDWORD);
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "winerror.h"
|
||||
#include "aclapi.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#define IS_HKCR(hk) ((UINT_PTR)hk > 0 && ((UINT_PTR)hk & 3) == 2)
|
||||
|
||||
static HKEY hkey_main;
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
#ifndef PROCESS_QUERY_LIMITED_INFORMATION
|
||||
#define PROCESS_QUERY_LIMITED_INFORMATION 0x1000
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "msg.h"
|
||||
|
||||
#define IS_WNDPROC_HANDLE(x) (((ULONG_PTR)(x) >> 16) == (~0u >> 16))
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
|
||||
static BOOL (WINAPI *pRemoveWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR);
|
||||
|
|
|
@ -1026,8 +1026,6 @@ static UINT_PTR WINAPI test_extension_wndproc(HWND dlg, UINT msg, WPARAM wParam,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
|
||||
|
||||
static void test_extension_helper(OPENFILENAMEA* ofn, const char *filter,
|
||||
const char *expected_filename)
|
||||
{
|
||||
|
|
|
@ -26,10 +26,6 @@
|
|||
#include "dwrite.h"
|
||||
#include "wincodec.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
struct resource_readback
|
||||
{
|
||||
ID3D10Resource *resource;
|
||||
|
|
|
@ -26,10 +26,6 @@
|
|||
#include "wine/heap.h"
|
||||
#include "wine/test.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#define BITS_NNAN 0xffc00000
|
||||
#define BITS_NAN 0x7fc00000
|
||||
#define BITS_NINF 0xff800000
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
#include "wine/heap.h"
|
||||
#include "wine/test.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#define BITS_NNAN 0xffc00000
|
||||
#define BITS_NAN 0x7fc00000
|
||||
#define BITS_NINF 0xff800000
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
#include <d3d8.h>
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
struct vec3
|
||||
{
|
||||
float x, y, z;
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
#include <initguid.h>
|
||||
#include <d3d9.h>
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
static HMODULE d3d9_handle = 0;
|
||||
static DEVMODEW registry_mode;
|
||||
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
#include <d3d9.h>
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
struct vec3
|
||||
{
|
||||
float x, y, z;
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#include <d3d9.h>
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
static DWORD texture_stages;
|
||||
|
||||
/* ============================ State Testing Framework ========================== */
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
#include <d3d9.h>
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
struct vec2
|
||||
{
|
||||
float x, y;
|
||||
|
|
|
@ -41,8 +41,6 @@ static float get_nan(void)
|
|||
#define NAN get_nan()
|
||||
#endif
|
||||
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*arr))
|
||||
|
||||
/* helper functions */
|
||||
static BOOL compare_float(FLOAT f, FLOAT g, UINT ulps)
|
||||
{
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
#include "d3dx9.h"
|
||||
#include <math.h>
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
static BOOL compare_float(float f, float g, unsigned int ulps)
|
||||
{
|
||||
int x = *(int *)&f;
|
||||
|
|
|
@ -42,8 +42,6 @@ static inline float __port_nan(void)
|
|||
|
||||
#define admitted_error 0.0001f
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array)/sizeof(*array))
|
||||
|
||||
#define compare_vertex_sizes(type, exp) \
|
||||
got=D3DXGetFVFVertexSize(type); \
|
||||
ok(got==exp, "Expected: %d, Got: %d\n", exp, got);
|
||||
|
|
|
@ -29,10 +29,6 @@ static DEVMODEW registry_mode;
|
|||
|
||||
static HRESULT (WINAPI *pDwmIsCompositionEnabled)(BOOL *);
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
struct vec2
|
||||
{
|
||||
float x, y;
|
||||
|
|
|
@ -31,10 +31,6 @@ static DEVMODEW registry_mode;
|
|||
|
||||
static HRESULT (WINAPI *pDwmIsCompositionEnabled)(BOOL *);
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
struct vec2
|
||||
{
|
||||
float x, y;
|
||||
|
|
|
@ -31,10 +31,6 @@ static DEVMODEW registry_mode;
|
|||
|
||||
static HRESULT (WINAPI *pDwmIsCompositionEnabled)(BOOL *);
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
struct vec2
|
||||
{
|
||||
float x, y;
|
||||
|
|
|
@ -32,10 +32,6 @@ static DEVMODEW registry_mode;
|
|||
|
||||
static HRESULT (WINAPI *pDwmIsCompositionEnabled)(BOOL *);
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
struct vec2
|
||||
{
|
||||
float x, y;
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
#include <dmusici.h>
|
||||
#include <dmusicf.h>
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
|
||||
|
||||
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
||||
|
||||
static BOOL missing_dmcompos(void)
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
#include <audioclient.h>
|
||||
#include <guiddef.h>
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
|
||||
|
||||
static BOOL missing_dmime(void)
|
||||
{
|
||||
IDirectMusicSegment8 *dms;
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#include <dmusicf.h>
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
|
||||
|
||||
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
||||
static unsigned char mp3file[] = "\xFF\xFB\x92\x04"; /* MP3 header */
|
||||
static unsigned char rifffile[8+4+8+16+8+256] = "RIFF\x24\x01\x00\x00WAVE" /* header: 4 ("WAVE") + (8 + 16) (format segment) + (8 + 256) (data segment) = 0x124 */
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
#include <dmusici.h>
|
||||
#include <dmusicf.h>
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
|
||||
|
||||
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
||||
|
||||
static BOOL missing_dmstyle(void)
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
static IDWriteFactory *factory;
|
||||
static const WCHAR test_fontfile[] = {'w','i','n','e','_','t','e','s','t','_','f','o','n','t','.','t','t','f',0};
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
#include "wine/heap.h"
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
#define MS_CMAP_TAG DWRITE_MAKE_OPENTYPE_TAG('c','m','a','p')
|
||||
#define MS_VDMX_TAG DWRITE_MAKE_OPENTYPE_TAG('V','D','M','X')
|
||||
#define MS_GASP_TAG DWRITE_MAKE_OPENTYPE_TAG('g','a','s','p')
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
#include "wine/test.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
static const WCHAR tahomaW[] = {'T','a','h','o','m','a',0};
|
||||
static const WCHAR enusW[] = {'e','n','-','u','s',0};
|
||||
|
||||
|
|
|
@ -23,10 +23,6 @@
|
|||
#include "d3d11.h"
|
||||
#include "wine/test.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
enum frame_latency
|
||||
{
|
||||
DEFAULT_FRAME_LATENCY = 3,
|
||||
|
|
|
@ -43,10 +43,6 @@
|
|||
|
||||
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(x) ( sizeof(x) / sizeof((x)[0]) )
|
||||
#endif
|
||||
|
||||
/* from pidl.h, not included here: */
|
||||
#ifndef PT_CPL /* Guess, Win7 uses this for CSIDL_CONTROLS */
|
||||
#define PT_CPL 0x01 /* no path */
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
DEFINE_GUID(IID_IParentAndItem, 0xB3A4B685, 0xB685, 0x4805, 0x99,0xD9, 0x5D,0xEA,0xD2,0x87,0x32,0x36);
|
||||
DEFINE_GUID(CLSID_ShellDocObjView, 0xe7e4bc40, 0xe76a, 0x11ce, 0xa9,0xbb, 0x00,0xaa,0x00,0x4a,0xe8,0x37);
|
||||
|
||||
#define ARRAY_SIZE(x) ( sizeof(x) / sizeof((x)[0]) )
|
||||
|
||||
static IMalloc *ppM;
|
||||
|
||||
static HRESULT (WINAPI *pSHCreateItemFromIDList)(PCIDLIST_ABSOLUTE pidl, REFIID riid, void **ppv);
|
||||
|
|
|
@ -1053,8 +1053,6 @@ static const DWORD biSize_tests[] = {
|
|||
0xffffffff
|
||||
};
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
|
||||
|
||||
static void test_LoadImageBitmap(const char * test_desc, HBITMAP hbm)
|
||||
{
|
||||
BITMAP bm;
|
||||
|
|
|
@ -31,10 +31,6 @@
|
|||
#include <windows.h>
|
||||
#include <usp10.h>
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
typedef struct _itemTest {
|
||||
char todo_flag[6];
|
||||
int iCharPos;
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
#include "wine/test.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda);
|
||||
|
||||
static WCHAR *a2w(const char *str)
|
||||
|
|
|
@ -130,6 +130,8 @@ extern void __winetest_cdecl winetest_trace( const char *msg, ... ) WINETEST_PRI
|
|||
#define todo_wine_if(is_todo) todo_if((is_todo) && !strcmp(winetest_platform, "wine"))
|
||||
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
#ifdef NONAMELESSUNION
|
||||
# define U(x) (x).u
|
||||
# define U1(x) (x).u1
|
||||
|
|
Loading…
Reference in New Issue