ReactOS 0.4.17-dev-116-ga4b6fe9
large_int.c File Reference
#include <stdlib.h>
#include <stdarg.h>
#include "ntstatus.h"
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/test.h"
Include dependency graph for large_int.c:

Go to the source code of this file.

Classes

struct  magic_divide_t
 
struct  largeint2str_t
 

Macros

#define WIN32_NO_STATUS
 
#define ULL(a, b)   (((ULONGLONG)(a) << 32) | (b))
 
#define LARGE_STRI_BUFFER_LENGTH   67
 

Functions

static LONGLONG (WINAPI *pRtlExtendedMagicDivide)(LONGLONG
 
static VOID (WINAPI *pRtlFreeAnsiString)(PSTRING)
 
static NTSTATUS (WINAPI *pRtlInt64ToUnicodeString)(ULONGLONG
 
static ULONGLONG (WINAPI *p_aulldiv)(ULONGLONG a
 
static void InitFunctionPtrs (void)
 
static void test_RtlExtendedMagicDivide (void)
 
static void one_RtlInt64ToUnicodeString_test (int test_num, const largeint2str_t *largeint2str)
 
static void test_RtlInt64ToUnicodeString (void)
 
static void one_RtlLargeIntegerToChar_test (int test_num, const largeint2str_t *largeint2str)
 
static void test_RtlLargeIntegerToChar (void)
 
static void test_builtins (void)
 
 START_TEST (large_int)
 

Variables

static HMODULE hntdll = 0
 
static LONGLONG
 
static INT
 
static ULONG
 
static UNICODE_STRING *static PCHAR
 
static const UNICODE_STRING BOOLEAN
 
static LONGLONG b
 
static voidp_allshl
 
static voidp_allshr
 
static voidp_aullshr
 
static const magic_divide_t magic_divide []
 
static const largeint2str_t largeint2str []
 

Macro Definition Documentation

◆ LARGE_STRI_BUFFER_LENGTH

#define LARGE_STRI_BUFFER_LENGTH   67

Definition at line 143 of file large_int.c.

◆ ULL

#define ULL (   a,
  b 
)    (((ULONGLONG)(a) << 32) | (b))

Definition at line 72 of file large_int.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 28 of file large_int.c.

Function Documentation

◆ InitFunctionPtrs()

static void InitFunctionPtrs ( void  )
static

Definition at line 50 of file large_int.c.

51{
52 hntdll = LoadLibraryA("ntdll.dll");
53 ok(hntdll != 0, "LoadLibrary failed\n");
54 if (hntdll) {
55 pRtlExtendedMagicDivide = (void *)GetProcAddress(hntdll, "RtlExtendedMagicDivide");
56 pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString");
57 pRtlInt64ToUnicodeString = (void *)GetProcAddress(hntdll, "RtlInt64ToUnicodeString");
58 pRtlLargeIntegerToChar = (void *)GetProcAddress(hntdll, "RtlLargeIntegerToChar");
59 pRtlUnicodeStringToAnsiString = (void *)GetProcAddress(hntdll, "RtlUnicodeStringToAnsiString");
60
61 p_alldiv = (void *)GetProcAddress(hntdll, "_alldiv");
62 p_allrem = (void *)GetProcAddress(hntdll, "_allrem");
63 p_allmul = (void *)GetProcAddress(hntdll, "_allmul");
64 p_allshl = (void *)GetProcAddress(hntdll, "_allshl");
65 p_allshr = (void *)GetProcAddress(hntdll, "_allshr");
66 p_aulldiv = (void *)GetProcAddress(hntdll, "_aulldiv");
67 p_aullrem = (void *)GetProcAddress(hntdll, "_aullrem");
68 p_aullshr = (void *)GetProcAddress(hntdll, "_aullshr");
69 } /* if */
70}
#define ok(value,...)
Definition: atltest.h:57
#define GetProcAddress(x, y)
Definition: compat.h:753
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
static HMODULE hntdll
Definition: large_int.c:36
static void * p_allshl
Definition: large_int.c:48
static void * p_aullshr
Definition: large_int.c:48
static void * p_allshr
Definition: large_int.c:48

Referenced by START_TEST().

◆ LONGLONG()

static LONGLONG ( WINAPI pRtlExtendedMagicDivide)
static

◆ NTSTATUS()

static NTSTATUS ( WINAPI pRtlInt64ToUnicodeString)
static

◆ one_RtlInt64ToUnicodeString_test()

static void one_RtlInt64ToUnicodeString_test ( int  test_num,
const largeint2str_t largeint2str 
)
static

Definition at line 297 of file large_int.c.

298{
299 int pos;
300 WCHAR expected_str_Buffer[LARGE_STRI_BUFFER_LENGTH + 1];
301 UNICODE_STRING expected_unicode_string;
302 STRING expected_ansi_str;
303 WCHAR str_Buffer[LARGE_STRI_BUFFER_LENGTH + 1];
304 UNICODE_STRING unicode_string;
305 STRING ansi_str;
307
308#ifdef _WIN64
309 if (largeint2str->value >> 32 == 0xffffffff) /* this crashes on 64-bit Vista */
310 {
311 skip( "Value ffffffff%08lx broken on 64-bit windows\n", (DWORD)largeint2str->value );
312 return;
313 }
314#endif
315
316 for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
317 expected_str_Buffer[pos] = largeint2str->Buffer[pos];
318 } /* for */
319 expected_unicode_string.Length = largeint2str->Length * sizeof(WCHAR);
320 expected_unicode_string.MaximumLength = largeint2str->MaximumLength * sizeof(WCHAR);
321 expected_unicode_string.Buffer = expected_str_Buffer;
322 pRtlUnicodeStringToAnsiString(&expected_ansi_str, &expected_unicode_string, 1);
323
324 for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
325 str_Buffer[pos] = '-';
326 } /* for */
327 unicode_string.Length = 0;
328 unicode_string.MaximumLength = largeint2str->MaximumLength * sizeof(WCHAR);
329 unicode_string.Buffer = str_Buffer;
330
331 if (largeint2str->base == 0) {
332 result = pRtlInt64ToUnicodeString(largeint2str->value, 10, &unicode_string);
333 } else {
334 result = pRtlInt64ToUnicodeString(largeint2str->value, largeint2str->base, &unicode_string);
335 } /* if */
336 pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
338 /* On BUFFER_OVERFLOW the string Buffer should be unchanged */
339 for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
340 expected_str_Buffer[pos] = '-';
341 } /* for */
342 /* w2k: The native function has two reasons for BUFFER_OVERFLOW: */
343 /* If the value is too large to convert: The Length is unchanged */
344 /* If str is too small to hold the string: Set str->Length to the length */
345 /* the string would have (which can be larger than the MaximumLength). */
346 /* To allow all this in the tests we do the following: */
347 if (expected_unicode_string.Length >= 64) {
348 /* The value is too large to convert only triggered when testing native */
349 /* Length is not filled with the expected string length (garbage?) */
350 expected_unicode_string.Length = unicode_string.Length;
351 } /* if */
352 } else {
354 "(test %d): RtlInt64ToUnicodeString(0x%s, %d, [out]) has result %lx, expected: %lx\n",
356 if (result == STATUS_SUCCESS) {
357 ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0',
358 "(test %d): RtlInt64ToUnicodeString(0x%s, %d, [out]) string \"%s\" is not NULL terminated\n",
359 test_num, wine_dbgstr_longlong(largeint2str->value), largeint2str->base, ansi_str.Buffer);
360 } /* if */
361 } /* if */
362 ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
363 "(test %d): RtlInt64ToUnicodeString(0x%I64x, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
364 test_num, largeint2str->value, largeint2str->base, ansi_str.Buffer, expected_ansi_str.Buffer);
365 ok(unicode_string.Length == expected_unicode_string.Length ||
366 broken(largeint2str->broken_len && !unicode_string.Length) /* win11 */,
367 "(test %d): RtlInt64ToUnicodeString(0x%s, %d, [out]) string has Length %d, expected: %d\n",
369 unicode_string.Length, expected_unicode_string.Length);
370 ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength,
371 "(test %d): RtlInt64ToUnicodeString(0x%s, %d, [out]) string has MaximumLength %d, expected: %d\n",
373 unicode_string.MaximumLength, expected_unicode_string.MaximumLength);
374 pRtlFreeAnsiString(&expected_ansi_str);
375 pRtlFreeAnsiString(&ansi_str);
376}
#define skip(...)
Definition: atltest.h:64
#define broken(x)
Definition: atltest.h:178
LONG NTSTATUS
Definition: precomp.h:26
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2802
unsigned long DWORD
Definition: ntddk_ex.h:95
std::wstring STRING
Definition: fontsub.cpp:33
GLuint64EXT * result
Definition: glext.h:11304
static const largeint2str_t largeint2str[]
Definition: large_int.c:161
#define LARGE_STRI_BUFFER_LENGTH
Definition: large_int.c:143
short WCHAR
Definition: pedump.c:58
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
USHORT MaximumLength
Definition: env_spec_w32.h:370
USHORT Length
Definition: large_int.c:148
USHORT MaximumLength
Definition: large_int.c:149
NTSTATUS result
Definition: large_int.c:151
const char * Buffer
Definition: large_int.c:150
ULONGLONG value
Definition: large_int.c:147

Referenced by test_RtlInt64ToUnicodeString().

◆ one_RtlLargeIntegerToChar_test()

static void one_RtlLargeIntegerToChar_test ( int  test_num,
const largeint2str_t largeint2str 
)
static

Definition at line 389 of file large_int.c.

390{
392 char dest_str[LARGE_STRI_BUFFER_LENGTH + 1];
394
395#ifdef _WIN64
396 if (largeint2str->value >> 32 == 0xffffffff) /* this crashes on 64-bit Vista */
397 {
398 skip( "Value ffffffff%08lx broken on 64-bit windows\n", (DWORD)largeint2str->value );
399 return;
400 }
401#endif
402
403 memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH);
404 dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0';
406 if (largeint2str->base == 0) {
407 result = pRtlLargeIntegerToChar(&value, 10, largeint2str->MaximumLength, dest_str);
408 } else {
409 result = pRtlLargeIntegerToChar(&value, largeint2str->base, largeint2str->MaximumLength, dest_str);
410 } /* if */
412 "(test %d): RtlLargeIntegerToChar(0x%s, %d, %d, [out]) has result %lx, expected: %lx\n",
416 "(test %d): RtlLargeIntegerToChar(0x%s, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
419}
#define memset(x, y, z)
Definition: compat.h:39
uint64_t ULONGLONG
Definition: typedefs.h:67
Definition: pdh_main.c:96

Referenced by test_RtlLargeIntegerToChar().

◆ START_TEST()

START_TEST ( large_int  )

Definition at line 582 of file large_int.c.

583{
585
586 if (pRtlExtendedMagicDivide)
588 if (pRtlInt64ToUnicodeString)
590 if (pRtlLargeIntegerToChar)
593}
static void test_RtlInt64ToUnicodeString(void)
Definition: large_int.c:379
static void InitFunctionPtrs(void)
Definition: large_int.c:50
static void test_RtlExtendedMagicDivide(void)
Definition: large_int.c:128
static void test_RtlLargeIntegerToChar(void)
Definition: large_int.c:422
static void test_builtins(void)
Definition: large_int.c:457

◆ test_builtins()

static void test_builtins ( void  )
static

Definition at line 457 of file large_int.c.

458{
459#ifdef __i386__
460 void *code_mem;
461 ULONGLONG u;
462 LONGLONG l;
463
464 static const BYTE call_shift_code[] =
465 {
466 0x55, /* pushl %ebp */
467 0x89, 0xe5, /* movl %esp,%ebp */
468 0x31, 0xc0, /* xorl %eax,%eax */
469 0x31, 0xd2, /* xorl %edx,%edx */
470 0x31, 0xc9, /* xorl %ecx,%ecx */
471 0x87, 0x45, 0x0c, /* xchgl 12(%ebp),%eax */
472 0x87, 0x55, 0x10, /* xchgl 16(%ebp),%edx */
473 0x87, 0x4d, 0x14, /* xchgl 20(%ebp),%ecx */
474 0xff, 0x55, 0x08, /* call *8(%ebp) */
475 0x39, 0xe5, /* cmpl %esp,%ebp */
476 0x74, 0x05, /* je 1f */
477 0xb8, 0xef, 0xbe, 0xad, 0xde, /* movl $0xdeadbeef,%eax */
478 0xc9, /* leave */
479 0xc3, /* ret */
480 };
481 LONGLONG (__cdecl *call_shift_func)(void *func, LONGLONG a, LONG b);
482
484
485 l = p_alldiv(100, 7);
486 ok(l == 14, "_alldiv returned %s\n", wine_dbgstr_longlong(l));
487
488 l = p_alldiv(-100, 7);
489 ok(l == -14, "_alldiv returned %s\n", wine_dbgstr_longlong(l));
490
491 l = p_alldiv(0x2000000040ll, 0x100000007ll);
492 ok(l == 0x1f, "_alldiv returned %s\n", wine_dbgstr_longlong(l));
493
494 u = p_aulldiv(100, 7);
495 ok(u == 14, "_aulldiv returned %s\n", wine_dbgstr_longlong(u));
496
497 u = p_aulldiv(-100, 7);
498 ok(u == 0x2492492492492484ull, "_alldiv returned %s\n", wine_dbgstr_longlong(u));
499
500 u = p_aulldiv(0x2000000040ull, 0x100000007ull);
501 ok(u == 0x1f, "_aulldiv returned %s\n", wine_dbgstr_longlong(u));
502
503 l = p_allrem(100, 7);
504 ok(l == 2, "_allrem returned %s\n", wine_dbgstr_longlong(l));
505
506 l = p_allrem(-100, 7);
507 ok(l == -2, "_allrem returned %s\n", wine_dbgstr_longlong(l));
508
509 l = p_allrem(0x2000000040ll, 0x100000007ll);
510 ok(l == 0xffffff67, "_allrem returned %s\n", wine_dbgstr_longlong(l));
511
512 u = p_aullrem(100, 7);
513 ok(u == 2, "_aullrem returned %s\n", wine_dbgstr_longlong(u));
514
515 u = p_aullrem(-100, 7);
516 ok(u == 0, "_allrem returned %s\n", wine_dbgstr_longlong(u));
517
518 u = p_aullrem(0x2000000040ull, 0x100000007ull);
519 ok(u == 0xffffff67, "_aullrem returned %s\n", wine_dbgstr_longlong(u));
520
521 l = p_allmul(3, 4);
522 ok(l == 12, "_allmul = %s\n", wine_dbgstr_longlong(l));
523
524 l = p_allmul(0x300000001ll, 4);
525 ok(l == 0xc00000004, "_allmul = %s\n", wine_dbgstr_longlong(l));
526
527 memcpy(code_mem, call_shift_code, sizeof(call_shift_code));
528 call_shift_func = code_mem;
529
530 l = call_shift_func(p_allshl, 0x0123456789abcdefll, 12);
531 ok(l == 0x3456789abcdef000ll, "got %#I64x\n", l);
532
533 l = call_shift_func(p_allshl, 0x0123456789abcdefll, 44);
534 ok(l == 0xbcdef00000000000ll, "got %#I64x\n", l);
535
536 l = call_shift_func(p_allshl, 0x0123456789abcdefll, 88);
537 ok(!l, "got %#I64x\n", l);
538
539 l = call_shift_func(p_allshl, 0x0123456789abcdefll, 0x88);
540 ok(!l, "got %#I64x\n", l);
541
542 l = call_shift_func(p_allshl, 0x0123456789abcdefll, 0x108);
543 ok(l == 0x23456789abcdef00ll, "got %#I64x\n", l);
544
545 l = call_shift_func(p_allshr, 0x0123456789abcdefll, 12);
546 ok(l == 0x0123456789abcll, "got %#I64x\n", l);
547
548 l = call_shift_func(p_allshr, 0x0123456789abcdefll, 44);
549 ok(l == 0x01234ll, "got %#I64x\n", l);
550
551 l = call_shift_func(p_allshr, 0x0123456789abcdefll, 88);
552 ok(!l, "got %#I64x\n", l);
553
554 l = call_shift_func(p_allshr, 0x8123456789abcdefll, 12);
555 ok(l == 0xfff8123456789abcll, "got %#I64x\n", l);
556
557 l = call_shift_func(p_allshr, 0x8123456789abcdefll, 44);
558 ok(l == 0xfffffffffff81234ll, "got %#I64x\n", l);
559
560 l = call_shift_func(p_allshr, 0x8123456789abcdefll, 88);
561 ok(l == -1ll, "got %#I64x\n", l);
562
563 l = call_shift_func(p_allshr, 0x8123456789abcdefll, 0x108);
564 ok(l == 0xff8123456789abcdll, "got %#I64x\n", l);
565
566 l = call_shift_func(p_aullshr, 0x8123456789abcdefll, 12);
567 ok(l == 0x8123456789abcll, "got %#I64x\n", l);
568
569 l = call_shift_func(p_aullshr, 0x8123456789abcdefll, 44);
570 ok(l == 0x81234ll, "got %#I64x\n", l);
571
572 l = call_shift_func(p_aullshr, 0x8123456789abcdefll, 88);
573 ok(!l, "got %#I64x\n", l);
574
575 l = call_shift_func(p_aullshr, 0x8123456789abcdefll, 0x108);
576 ok(l == 0x8123456789abcdll, "got %#I64x\n", l);
577
579#endif /* __i386__ */
580}
r l[0]
Definition: byte_order.h:168
#define NULL
Definition: types.h:112
#define __cdecl
Definition: corecrt.h:121
GLenum func
Definition: glext.h:6028
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define a
Definition: ke_i.h:78
static LONGLONG b
Definition: large_int.c:43
static LONGLONG
Definition: large_int.c:37
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static void * code_mem
Definition: exception.c:51
#define MEM_RESERVE
Definition: nt_native.h:1317
#define MEM_RELEASE
Definition: nt_native.h:1319
#define MEM_COMMIT
Definition: nt_native.h:1316
#define PAGE_EXECUTE_READWRITE
Definition: nt_native.h:1311
long LONG
Definition: pedump.c:60
int64_t LONGLONG
Definition: typedefs.h:68
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
Definition: virtmem.c:65
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
Definition: virtmem.c:119
unsigned char BYTE
Definition: xxhash.c:193

Referenced by START_TEST().

◆ test_RtlExtendedMagicDivide()

static void test_RtlExtendedMagicDivide ( void  )
static

Definition at line 128 of file large_int.c.

129{
130 int i;
132
133 for (i = 0; i < ARRAY_SIZE(magic_divide); i++) {
134 result = pRtlExtendedMagicDivide(magic_divide[i].a, magic_divide[i].b, magic_divide[i].shift);
136 "call failed: RtlExtendedMagicDivide(0x%s, 0x%s, %d) has result 0x%s, expected 0x%s\n",
139 }
140}
#define ARRAY_SIZE(A)
Definition: main.h:20
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static const magic_divide_t magic_divide[]
Definition: large_int.c:81
#define shift
Definition: input.c:3280

Referenced by START_TEST().

◆ test_RtlInt64ToUnicodeString()

static void test_RtlInt64ToUnicodeString ( void  )
static

Definition at line 379 of file large_int.c.

380{
381 int test_num;
382
383 for (test_num = 0; test_num < ARRAY_SIZE(largeint2str); test_num++) {
385 } /* for */
386}
static void one_RtlInt64ToUnicodeString_test(int test_num, const largeint2str_t *largeint2str)
Definition: large_int.c:297

Referenced by START_TEST().

◆ test_RtlLargeIntegerToChar()

static void test_RtlLargeIntegerToChar ( void  )
static

Definition at line 422 of file large_int.c.

423{
425 int test_num;
427
428 for (test_num = 0; test_num < ARRAY_SIZE(largeint2str); test_num++) {
429 one_RtlLargeIntegerToChar_test(test_num, &largeint2str[test_num]);
430 } /* for */
431
433 result = pRtlLargeIntegerToChar(&value, 20, largeint2str[0].MaximumLength, NULL);
435 "(test a): RtlLargeIntegerToChar(0x%s, %d, %d, NULL) has result %lx, expected: %lx\n",
438
439 result = pRtlLargeIntegerToChar(&value, 20, 0, NULL);
441 "(test b): RtlLargeIntegerToChar(0x%s, %d, %d, NULL) has result %lx, expected: %lx\n",
444
445 result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, 0, NULL);
447 "(test c): RtlLargeIntegerToChar(0x%s, %d, %d, NULL) has result %lx, expected: %lx\n",
449
450 result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, largeint2str[0].MaximumLength, NULL);
452 "(test d): RtlLargeIntegerToChar(0x%s, %d, %d, NULL) has result %lx, expected: %lx\n",
455}
#define STATUS_ACCESS_VIOLATION
static void one_RtlLargeIntegerToChar_test(int test_num, const largeint2str_t *largeint2str)
Definition: large_int.c:389
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_In_ WDFDMATRANSACTION _In_ size_t MaximumLength

Referenced by START_TEST().

◆ ULONGLONG()

static ULONGLONG ( WINAPI p_aulldiv)
static

◆ VOID()

static VOID ( WINAPI pRtlFreeAnsiString)
static

Variable Documentation

◆ b

Definition at line 43 of file large_int.c.

Referenced by test_builtins().

◆ BOOLEAN

Definition at line 41 of file large_int.c.

◆ hntdll

HMODULE hntdll = 0
static

Definition at line 36 of file large_int.c.

Referenced by InitFunctionPtrs().

◆ INT

INT

Definition at line 37 of file large_int.c.

◆ largeint2str

◆ LONGLONG

Definition at line 37 of file large_int.c.

Referenced by test_builtins().

◆ magic_divide

const magic_divide_t magic_divide[]
static

Definition at line 81 of file large_int.c.

Referenced by test_RtlExtendedMagicDivide().

◆ p_allshl

void* p_allshl
static

Definition at line 48 of file large_int.c.

Referenced by InitFunctionPtrs(), and test_builtins().

◆ p_allshr

void * p_allshr
static

Definition at line 48 of file large_int.c.

Referenced by InitFunctionPtrs(), and test_builtins().

◆ p_aullshr

void * p_aullshr
static

Definition at line 48 of file large_int.c.

Referenced by InitFunctionPtrs(), and test_builtins().

◆ PCHAR

Definition at line 40 of file large_int.c.

◆ ULONG

Definition at line 39 of file large_int.c.