476 int i,
len, expected_len;
478 static const BOOL directly_encodable_table[] =
480 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
481 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
482 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
484 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
486 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
487 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
489 static const char base64_encoding_table[] =
490 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
500 char expected_dst[16];
508 {0x4F60,0x597D,0x5417,0}, -1,
output,
sizeof(
output) - 1,
513 {0x4F60,0x597D,0x5417,0}, -2,
output,
sizeof(
output) - 1,
518 {0x4F60,0x597D,0x5417,0}, -1,
output, 10,
523 {0x4F60,0x597D,0x5417,0}, -1,
output, 11,
528 {0x4F60,0x597D,0x5417,0}, -1,
output, 12,
533 {0x4F60,0x597D,0x5417,0}, -1,
NULL, 0,
538 {0x4F60,0x597D,0x5417,0}, -1,
output, 0,
548 {0x4F60,0x597D,0x5417,0}, 2,
output,
sizeof(
output) - 1,
558 {
'h',
'e',
'l',
'l',
'o',0}, -1,
output, 2,
563 {0x4F60,0x0001,0}, -1,
output, 2,
568 {0x4F60,0x0001,0}, -1,
output, 3,
573 {0x4F60,0x0001,0}, -1,
output, 4,
578 {0x4F60,0}, -1,
output, 1,
584 {0x4F60,0x597D,0x5417,0}, -1,
output, 9,
590 {0x4F60,0}, -1,
output, 4,
601 for (
i = 0;
i <= 0xFFFF;
i++)
619 else if (
i <= 0x7F && directly_encodable_table[
i])
630 base64_encoding_table[(
i & 0xFC00) >> 10],
631 base64_encoding_table[(
i & 0x03F0) >> 4],
632 base64_encoding_table[(
i & 0x000F) << 2]);
635 ok(
len == expected_len,
"i=0x%04x: expected len=%i, got len=%i\n",
i, expected_len,
len);
637 "i=0x%04x: expected output='%s', got output='%s'\n",
i,
expected,
output);
638 ok(
output[expected_len] ==
'#',
"i=0x%04x: expected output[%i]='#', got output[%i]=%i\n",
639 i, expected_len, expected_len,
output[expected_len]);
644 for (
i = 0;
i <= 0xFFFF;
i++)
662 else if (
i <= 0x7F && directly_encodable_table[
i])
673 base64_encoding_table[8 | ((
i & 0xC000) >> 14)],
674 base64_encoding_table[(
i & 0x3F00) >> 8],
675 base64_encoding_table[(
i & 0x00FC) >> 2],
676 base64_encoding_table[((
i & 0x0003) << 4) | 2]);
679 ok(
len == expected_len,
"i=0x%04x: expected len=%i, got len=%i\n",
i, expected_len,
len);
681 "i=0x%04x: expected output='%s', got output='%s'\n",
i,
expected,
output);
682 ok(
output[expected_len] ==
'#',
"i=0x%04x: expected output[%i]='#', got output[%i]=%i\n",
683 i, expected_len, expected_len,
output[expected_len]);
698 "tests[%i]: expected error=0x%x, got error=0x%x\n",
706 "tests[%i]: expected dst='%s', got dst='%s'\n",
709 "tests[%i]: expected dst[%i]='#', got dst[%i]=%i\n",
struct param_test tests[]
static UCHAR ULONG UCHAR ULONG UCHAR * output
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define WideCharToMultiByte
DWORD WINAPI GetLastError(VOID)
#define sprintf(buf, format,...)
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
static DWORD LPDWORD LPCSTR DWORD srclen
GLenum GLenum GLenum input
char * strcpy(char *DstString, const char *SrcString)
#define ERROR_INSUFFICIENT_BUFFER