mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
Add trailing '\n's to ok() calls.
This commit is contained in:
parent
a24da03943
commit
231fbff8d0
@ -83,7 +83,7 @@ void CheckSize(HWND hwnd, INT width, INT height)
|
||||
r1.left=r1.top=r1.right=r1.bottom=0;
|
||||
SendMessage (hwnd, TCM_GETITEMRECT, 0, (LPARAM) &rTab);
|
||||
SendMessage (hwnd, TCM_ADJUSTRECT, FALSE, (LPARAM) &r1);
|
||||
/* trace ("Got (%ld,%ld)-(%ld,%ld)", rTab.left, rTab.top, rTab.right, rTab.bottom); */
|
||||
/* trace ("Got (%ld,%ld)-(%ld,%ld)\n", rTab.left, rTab.top, rTab.right, rTab.bottom); */
|
||||
trace (" (%ld,%ld)-(%ld,%ld)\n", r1.left, r1.top, r1.right, r1.bottom);
|
||||
if ((width >= 0) && (height < 0))
|
||||
ok (width == rTab.right - rTab.left, "Expected [%d] got [%ld]\n", width, rTab.right - rTab.left);
|
||||
|
@ -42,8 +42,8 @@ static void test_fdopen( void )
|
||||
fd = open ("fdopen.tst", O_RDONLY | O_BINARY);
|
||||
lseek (fd, 5, SEEK_SET);
|
||||
file = fdopen (fd, "rb");
|
||||
ok (fread (buffer, 1, sizeof (buffer), file) == 5, "read wrong byte count");
|
||||
ok (memcmp (buffer, buffer + 5, 5) == 0, "read wrong bytes");
|
||||
ok (fread (buffer, 1, sizeof (buffer), file) == 5, "read wrong byte count\n");
|
||||
ok (memcmp (buffer, buffer + 5, 5) == 0, "read wrong bytes\n");
|
||||
fclose (file);
|
||||
unlink ("fdopen.tst");
|
||||
}
|
||||
@ -62,27 +62,27 @@ static void test_fileops( void )
|
||||
|
||||
fd = open ("fdopen.tst", O_RDONLY | O_BINARY);
|
||||
file = fdopen (fd, "rb");
|
||||
ok(strlen(outbuffer) == (sizeof(outbuffer)-1),"strlen/sizeof error");
|
||||
ok(fgets(buffer,sizeof(buffer),file) !=0,"fgets failed unexpected");
|
||||
ok(fgets(buffer,sizeof(buffer),file) ==0,"fgets didn't signal EOF");
|
||||
ok(feof(file) !=0,"feof doesn't signal EOF");
|
||||
ok(strlen(outbuffer) == (sizeof(outbuffer)-1),"strlen/sizeof error\n");
|
||||
ok(fgets(buffer,sizeof(buffer),file) !=0,"fgets failed unexpected\n");
|
||||
ok(fgets(buffer,sizeof(buffer),file) ==0,"fgets didn't signal EOF\n");
|
||||
ok(feof(file) !=0,"feof doesn't signal EOF\n");
|
||||
rewind(file);
|
||||
ok(fgets(buffer,strlen(outbuffer),file) !=0,"fgets failed unexpected");
|
||||
ok(lstrlenA(buffer) == strlen(outbuffer) -1,"fgets didn't read right size");
|
||||
ok(fgets(buffer,sizeof(outbuffer),file) !=0,"fgets failed unexpected");
|
||||
ok(strlen(buffer) == 1,"fgets dropped chars");
|
||||
ok(buffer[0] == outbuffer[strlen(outbuffer)-1],"fgets exchanged chars");
|
||||
ok(fgets(buffer,strlen(outbuffer),file) !=0,"fgets failed unexpected\n");
|
||||
ok(lstrlenA(buffer) == strlen(outbuffer) -1,"fgets didn't read right size\n");
|
||||
ok(fgets(buffer,sizeof(outbuffer),file) !=0,"fgets failed unexpected\n");
|
||||
ok(strlen(buffer) == 1,"fgets dropped chars\n");
|
||||
ok(buffer[0] == outbuffer[strlen(outbuffer)-1],"fgets exchanged chars\n");
|
||||
fclose (file);
|
||||
fd = open ("fdopen.tst", O_RDONLY | O_TEXT);
|
||||
file = fdopen (fd, "rt"); /* open in TEXT mode */
|
||||
ok(fgetws(wbuffer,sizeof(wbuffer),file) !=0,"fgetws failed unexpected");
|
||||
ok(fgetws(wbuffer,sizeof(wbuffer),file) ==0,"fgetws didn't signal EOF");
|
||||
ok(feof(file) !=0,"feof doesn't signal EOF");
|
||||
ok(fgetws(wbuffer,sizeof(wbuffer),file) !=0,"fgetws failed unexpected\n");
|
||||
ok(fgetws(wbuffer,sizeof(wbuffer),file) ==0,"fgetws didn't signal EOF\n");
|
||||
ok(feof(file) !=0,"feof doesn't signal EOF\n");
|
||||
rewind(file);
|
||||
ok(fgetws(wbuffer,strlen(outbuffer),file) !=0,"fgetws failed unexpected");
|
||||
ok(lstrlenW(wbuffer) == (strlen(outbuffer) -1),"fgetws didn't read right size");
|
||||
ok(fgetws(wbuffer,sizeof(outbuffer),file) !=0,"fgets failed unexpected");
|
||||
ok(lstrlenW(wbuffer) == 1,"fgets dropped chars");
|
||||
ok(fgetws(wbuffer,strlen(outbuffer),file) !=0,"fgetws failed unexpected\n");
|
||||
ok(lstrlenW(wbuffer) == (strlen(outbuffer) -1),"fgetws didn't read right size\n");
|
||||
ok(fgetws(wbuffer,sizeof(outbuffer),file) !=0,"fgets failed unexpected\n");
|
||||
ok(lstrlenW(wbuffer) == 1,"fgets dropped chars\n");
|
||||
fclose (file);
|
||||
unlink ("fdopen.tst");
|
||||
}
|
||||
@ -122,7 +122,7 @@ static void test_fgetwc( void )
|
||||
{
|
||||
diff_found |= (*aptr != *wptr);
|
||||
}
|
||||
ok(!(diff_found), "fgetwc difference found in TEXT mode");
|
||||
ok(!(diff_found), "fgetwc difference found in TEXT mode\n");
|
||||
if(mytextW) free (mytextW);
|
||||
fclose(tempfh);
|
||||
unlink(tempf);
|
||||
@ -146,19 +146,19 @@ static void test_file_put_get( void )
|
||||
fclose(tempfh);
|
||||
tempfh = fopen(tempf,"rb"); /* open in TEXT mode */
|
||||
fgets(btext,LLEN,tempfh);
|
||||
ok( strlen(mytext) + 1 == strlen(btext),"TEXT/BINARY mode not handled for write");
|
||||
ok( btext[strlen(mytext)-1] == '\r', "CR not written");
|
||||
ok( strlen(mytext) + 1 == strlen(btext),"TEXT/BINARY mode not handled for write\n");
|
||||
ok( btext[strlen(mytext)-1] == '\r', "CR not written\n");
|
||||
fclose(tempfh);
|
||||
tempfh = fopen(tempf,"wb"); /* open in BINARY mode */
|
||||
fputs(dostext,tempfh);
|
||||
fclose(tempfh);
|
||||
tempfh = fopen(tempf,"rt"); /* open in TEXT mode */
|
||||
fgets(btext,LLEN,tempfh);
|
||||
ok(strcmp(btext, mytext) == 0,"_O_TEXT read doesn't strip CR");
|
||||
ok(strcmp(btext, mytext) == 0,"_O_TEXT read doesn't strip CR\n");
|
||||
fclose(tempfh);
|
||||
tempfh = fopen(tempf,"rb"); /* open in TEXT mode */
|
||||
fgets(btext,LLEN,tempfh);
|
||||
ok(strcmp(btext, dostext) == 0,"_O_BINARY read doesn't preserve CR");
|
||||
ok(strcmp(btext, dostext) == 0,"_O_BINARY read doesn't preserve CR\n");
|
||||
|
||||
fclose(tempfh);
|
||||
tempfh = fopen(tempf,"rt"); /* open in TEXT mode */
|
||||
@ -171,7 +171,7 @@ static void test_file_put_get( void )
|
||||
{
|
||||
diff_found |= (*aptr != *wptr);
|
||||
}
|
||||
ok(!(diff_found), "fgetwc doesn't strip CR in TEXT mode");
|
||||
ok(!(diff_found), "fgetwc doesn't strip CR in TEXT mode\n");
|
||||
if(mytextW) free (mytextW);
|
||||
fclose(tempfh);
|
||||
unlink(tempf);
|
||||
@ -187,48 +187,48 @@ static void test_file_write_read( void )
|
||||
tempf=_tempnam(".","wne");
|
||||
ok((tempfd = _open(tempf,_O_CREAT|_O_TRUNC|_O_TEXT|_O_RDWR,
|
||||
_S_IREAD | _S_IWRITE)) != -1,
|
||||
"Can't open '%s': %d", tempf, errno); /* open in TEXT mode */
|
||||
"Can't open '%s': %d\n", tempf, errno); /* open in TEXT mode */
|
||||
ok(_write(tempfd,mytext,strlen(mytext)) == lstrlenA(mytext),
|
||||
"_write _O_TEXT bad return value");
|
||||
"_write _O_TEXT bad return value\n");
|
||||
_close(tempfd);
|
||||
tempfd = _open(tempf,_O_RDONLY|_O_BINARY,0); /* open in BINARY mode */
|
||||
ok(_read(tempfd,btext,LLEN) == lstrlenA(dostext),
|
||||
"_read _O_BINARY got bad length");
|
||||
"_read _O_BINARY got bad length\n");
|
||||
ok( memcmp(dostext,btext,strlen(dostext)) == 0,
|
||||
"problems with _O_TEXT _write / _O_BINARY _read");
|
||||
ok( btext[strlen(dostext)-2] == '\r', "CR not written or read");
|
||||
"problems with _O_TEXT _write / _O_BINARY _read\n");
|
||||
ok( btext[strlen(dostext)-2] == '\r', "CR not written or read\n");
|
||||
_close(tempfd);
|
||||
tempfd = _open(tempf,_O_RDONLY|_O_TEXT); /* open in TEXT mode */
|
||||
ok(_read(tempfd,btext,LLEN) == lstrlenA(mytext),
|
||||
"_read _O_TEXT got bad length");
|
||||
"_read _O_TEXT got bad length\n");
|
||||
ok( memcmp(mytext,btext,strlen(mytext)) == 0,
|
||||
"problems with _O_TEXT _write / _read");
|
||||
"problems with _O_TEXT _write / _read\n");
|
||||
_close(tempfd);
|
||||
ok(unlink(tempf) !=-1 ,"Can't unlink '%s': %d", tempf, errno);
|
||||
ok(unlink(tempf) !=-1 ,"Can't unlink '%s': %d\n", tempf, errno);
|
||||
|
||||
tempf=_tempnam(".","wne");
|
||||
ok((tempfd = _open(tempf,_O_CREAT|_O_TRUNC|_O_BINARY|_O_RDWR,0)) != -1,
|
||||
"Can't open '%s': %d", tempf, errno); /* open in BINARY mode */
|
||||
"Can't open '%s': %d\n", tempf, errno); /* open in BINARY mode */
|
||||
ok(_write(tempfd,dostext,strlen(dostext)) == lstrlenA(dostext),
|
||||
"_write _O_BINARY bad return value");
|
||||
"_write _O_BINARY bad return value\n");
|
||||
_close(tempfd);
|
||||
tempfd = _open(tempf,_O_RDONLY|_O_BINARY,0); /* open in BINARY mode */
|
||||
ok(_read(tempfd,btext,LLEN) == lstrlenA(dostext),
|
||||
"_read _O_BINARY got bad length");
|
||||
"_read _O_BINARY got bad length\n");
|
||||
ok( memcmp(dostext,btext,strlen(dostext)) == 0,
|
||||
"problems with _O_BINARY _write / _read");
|
||||
ok( btext[strlen(dostext)-2] == '\r', "CR not written or read");
|
||||
"problems with _O_BINARY _write / _read\n");
|
||||
ok( btext[strlen(dostext)-2] == '\r', "CR not written or read\n");
|
||||
_close(tempfd);
|
||||
tempfd = _open(tempf,_O_RDONLY|_O_TEXT); /* open in TEXT mode */
|
||||
ok(_read(tempfd,btext,LLEN) == lstrlenA(mytext),
|
||||
"_read _O_TEXT got bad length");
|
||||
"_read _O_TEXT got bad length\n");
|
||||
ok( memcmp(mytext,btext,strlen(mytext)) == 0,
|
||||
"problems with _O_BINARY _write / _O_TEXT _read");
|
||||
"problems with _O_BINARY _write / _O_TEXT _read\n");
|
||||
_close(tempfd);
|
||||
|
||||
ok(_chmod (tempf, _S_IREAD | _S_IWRITE) == 0,
|
||||
"Can't chmod '%s' to read-write: %d", tempf, errno);
|
||||
ok(unlink(tempf) !=-1 ,"Can't unlink '%s': %d", tempf, errno);
|
||||
"Can't chmod '%s' to read-write: %d\n", tempf, errno);
|
||||
ok(unlink(tempf) !=-1 ,"Can't unlink '%s': %d\n", tempf, errno);
|
||||
}
|
||||
|
||||
static void test_tmpnam( void )
|
||||
@ -237,17 +237,17 @@ static void test_tmpnam( void )
|
||||
char *res;
|
||||
|
||||
res = tmpnam(NULL);
|
||||
ok(res != NULL, "tmpnam returned NULL");
|
||||
ok(res[0] == '\\', "first character is not a backslash");
|
||||
ok(strchr(res+1, '\\') == 0, "file not in the root directory");
|
||||
ok(res[strlen(res)-1] == '.', "first call - last character is not a dot");
|
||||
ok(res != NULL, "tmpnam returned NULL\n");
|
||||
ok(res[0] == '\\', "first character is not a backslash\n");
|
||||
ok(strchr(res+1, '\\') == 0, "file not in the root directory\n");
|
||||
ok(res[strlen(res)-1] == '.', "first call - last character is not a dot\n");
|
||||
|
||||
res = tmpnam(name);
|
||||
ok(res != NULL, "tmpnam returned NULL");
|
||||
ok(res == name, "supplied buffer was not used");
|
||||
ok(res[0] == '\\', "first character is not a backslash");
|
||||
ok(strchr(res+1, '\\') == 0, "file not in the root directory");
|
||||
ok(res[strlen(res)-1] != '.', "second call - last character is not a dot");
|
||||
ok(res != NULL, "tmpnam returned NULL\n");
|
||||
ok(res == name, "supplied buffer was not used\n");
|
||||
ok(res[0] == '\\', "first character is not a backslash\n");
|
||||
ok(strchr(res+1, '\\') == 0, "file not in the root directory\n");
|
||||
ok(res[strlen(res)-1] != '.', "second call - last character is not a dot\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,13 +26,13 @@ static void test_realloc( void )
|
||||
void *mem = NULL;
|
||||
|
||||
mem = realloc(mem, 10);
|
||||
ok(mem != NULL, "memory not allocated");
|
||||
ok(mem != NULL, "memory not allocated\n");
|
||||
|
||||
mem = realloc(mem, 20);
|
||||
ok(mem != NULL, "memory not reallocated");
|
||||
ok(mem != NULL, "memory not reallocated\n");
|
||||
|
||||
mem = realloc(mem, 0);
|
||||
ok(mem == NULL, "memory nto freed");
|
||||
ok(mem == NULL, "memory not freed\n");
|
||||
}
|
||||
|
||||
START_TEST(heap)
|
||||
|
@ -36,65 +36,65 @@ static void test_sscanf( void )
|
||||
/* check EOF */
|
||||
strcpy(buffer,"");
|
||||
ret = sscanf(buffer, "%d", &result);
|
||||
ok( ret == EOF,"sscanf returns %x instead of %x", ret, EOF );
|
||||
ok( ret == EOF,"sscanf returns %x instead of %x\n", ret, EOF );
|
||||
|
||||
/* check %x */
|
||||
strcpy(buffer,"0x519");
|
||||
ok( sscanf(buffer, "%x", &result) == 1, "sscanf failed" );
|
||||
ok( result == 0x519,"sscanf reads %x instead of %x", result, 0x519 );
|
||||
ok( sscanf(buffer, "%x", &result) == 1, "sscanf failed\n" );
|
||||
ok( result == 0x519,"sscanf reads %x instead of %x\n", result, 0x519 );
|
||||
|
||||
strcpy(buffer,"0x51a");
|
||||
ok( sscanf(buffer, "%x", &result) == 1, "sscanf failed" );
|
||||
ok( result == 0x51a ,"sscanf reads %x instead of %x", result, 0x51a );
|
||||
ok( sscanf(buffer, "%x", &result) == 1, "sscanf failed\n" );
|
||||
ok( result == 0x51a ,"sscanf reads %x instead of %x\n", result, 0x51a );
|
||||
|
||||
strcpy(buffer,"0x51g");
|
||||
ok( sscanf(buffer, "%x", &result) == 1, "sscanf failed" );
|
||||
ok( result == 0x51, "sscanf reads %x instead of %x", result, 0x51 );
|
||||
ok( sscanf(buffer, "%x", &result) == 1, "sscanf failed\n" );
|
||||
ok( result == 0x51, "sscanf reads %x instead of %x\n", result, 0x51 );
|
||||
|
||||
/* check % followed by any char */
|
||||
strcpy(buffer,"\"%12@");
|
||||
strcpy(format,"%\"%%%d%@"); /* work around gcc format check */
|
||||
ok( sscanf(buffer, format, &result) == 1, "sscanf failed" );
|
||||
ok( result == 12, "sscanf reads %x instead of %x", result, 12 );
|
||||
ok( sscanf(buffer, format, &result) == 1, "sscanf failed\n" );
|
||||
ok( result == 12, "sscanf reads %x instead of %x\n", result, 12 );
|
||||
|
||||
/* Check float */
|
||||
ret = sprintf(buffer,"%f %f",res1, res2);
|
||||
ret = sscanf(buffer,"%f%f",&res11, &res12);
|
||||
ok( (res11 == res1) && (res12 == res2), "Error reading floats");
|
||||
ok( (res11 == res1) && (res12 == res2), "Error reading floats\n");
|
||||
|
||||
/* check strings */
|
||||
ret = sprintf(buffer," %s", pname);
|
||||
ret = sscanf(buffer,"%*c%[^\n]",buffer1);
|
||||
ok( ret == 1, "Error with format \"%s\"","%*c%[^\n]");
|
||||
ok( strncmp(pname,buffer1,strlen(buffer1)) == 0, "Error with \"%s\" \"%s\"",pname, buffer1);
|
||||
ok( ret == 1, "Error with format \"%s\"\n","%*c%[^\n]");
|
||||
ok( strncmp(pname,buffer1,strlen(buffer1)) == 0, "Error with \"%s\" \"%s\"\n",pname, buffer1);
|
||||
|
||||
ret = sscanf("abcefgdh","%*[a-cg-e]%c",&buffer[0]);
|
||||
ok( ret == 1, "Error with format \"%s\"","%*[a-cg-e]%c");
|
||||
ok( buffer[0] == 'd', "Error with \"abcefgdh\" \"%c\"", buffer[0]);
|
||||
ok( ret == 1, "Error with format \"%s\"\n","%*[a-cg-e]%c");
|
||||
ok( buffer[0] == 'd', "Error with \"abcefgdh\" \"%c\"\n", buffer[0]);
|
||||
|
||||
ret = sscanf("abcefgdh","%*[a-cd-dg-e]%c",&buffer[0]);
|
||||
ok( ret == 1, "Error with format \"%s\"","%*[a-cd-dg-e]%c");
|
||||
ok( buffer[0] == 'h', "Error with \"abcefgdh\" \"%c\"", buffer[0]);
|
||||
ok( ret == 1, "Error with format \"%s\"\n","%*[a-cd-dg-e]%c");
|
||||
ok( buffer[0] == 'h', "Error with \"abcefgdh\" \"%c\"\n", buffer[0]);
|
||||
|
||||
/* check digits */
|
||||
ret = sprintf(buffer,"%d:%d:%d",hour,min,sec);
|
||||
ret = sscanf(buffer,"%d%n",&number,&number_so_far);
|
||||
ok(ret == 1 , "problem with format arg \"%%d%%n\"");
|
||||
ok(number == hour,"Read wrong arg %d instead of %d",number, hour);
|
||||
ok(number_so_far == 2,"Read wrong arg for \"%%n\" %d instead of 2",number_so_far);
|
||||
ok(ret == 1 , "problem with format arg \"%%d%%n\"\n");
|
||||
ok(number == hour,"Read wrong arg %d instead of %d\n",number, hour);
|
||||
ok(number_so_far == 2,"Read wrong arg for \"%%n\" %d instead of 2\n",number_so_far);
|
||||
|
||||
ret = sscanf(buffer+2,"%*c%n",&number_so_far);
|
||||
ok(ret == 0 , "problem with format arg \"%%*c%%n\"");
|
||||
ok(number_so_far == 1,"Read wrong arg for \"%%n\" %d instead of 2",number_so_far);
|
||||
ok(ret == 0 , "problem with format arg \"%%*c%%n\"\n");
|
||||
ok(number_so_far == 1,"Read wrong arg for \"%%n\" %d instead of 2\n",number_so_far);
|
||||
|
||||
/* Check %i according to bug 1878 */
|
||||
strcpy(buffer,"123");
|
||||
ret = sscanf(buffer, "%i", &result);
|
||||
ok( ret == 1 , "Wrong number of arguments read");
|
||||
ok(result == 123, "Wrong number read");
|
||||
ok( ret == 1 , "Wrong number of arguments read\n");
|
||||
ok(result == 123, "Wrong number read\n");
|
||||
ret = sscanf(buffer, "%d", &result);
|
||||
ok( ret == 1 , "Wrong number of arguments read");
|
||||
ok(result == 123, "Wrong number read");
|
||||
ok( ret == 1 , "Wrong number of arguments read\n");
|
||||
ok(result == 123, "Wrong number read\n");
|
||||
}
|
||||
|
||||
static void test_sprintf( void )
|
||||
@ -140,11 +140,11 @@ static void test_snprintf (void)
|
||||
const int valid = n < 0 ? bufsiz : (n == bufsiz ? n : n+1);
|
||||
|
||||
todo (tests[i].todo.retval ? "wine" : "none")
|
||||
ok (n == expect, "\"%s\": expected %d, returned %d",
|
||||
ok (n == expect, "\"%s\": expected %d, returned %d\n",
|
||||
fmt, expect, n);
|
||||
todo (tests[i].todo.render ? "wine" : "none")
|
||||
ok (!memcmp (fmt, buffer, valid),
|
||||
"\"%s\": rendered \"%.*s\"", fmt, valid, buffer);
|
||||
"\"%s\": rendered \"%.*s\"\n", fmt, valid, buffer);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -48,12 +48,12 @@ START_TEST(olefont)
|
||||
hres = OleCreateFontIndirect(NULL, &IID_IFont, &pvObj);
|
||||
font = pvObj;
|
||||
|
||||
ok(hres == S_OK,"OCFI (NULL,..) does not return 0, but 0x%08lx",hres);
|
||||
ok(font != NULL,"OCFI (NULL,..) does return NULL, insytead of !NULL");
|
||||
ok(hres == S_OK,"OCFI (NULL,..) does not return 0, but 0x%08lx\n",hres);
|
||||
ok(font != NULL,"OCFI (NULL,..) returns NULL, instead of !NULL\n");
|
||||
|
||||
pvObj = NULL;
|
||||
hres = IFont_QueryInterface( font, &IID_IFont, &pvObj);
|
||||
|
||||
ok(hres == S_OK,"IFont_QI does not return S_OK, but 0x%08lx", hres);
|
||||
ok(pvObj != NULL,"IFont_QI does return NULL, instead of a ptr");
|
||||
ok(hres == S_OK,"IFont_QI does not return S_OK, but 0x%08lx\n", hres);
|
||||
ok(pvObj != NULL,"IFont_QI does return NULL, instead of a ptr\n");
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ static HMODULE hOleaut32;
|
||||
|
||||
#define _EXPECTRES(res, x, fs) \
|
||||
ok((hres == S_OK && out == (CONV_TYPE)(x)) || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected " #x ", got " fs "; hres=0x%08lx", out, hres)
|
||||
"expected " #x ", got " fs "; hres=0x%08lx\n", out, hres)
|
||||
#define EXPECT(x) EXPECTRES(S_OK, (x))
|
||||
#define EXPECT_OVERFLOW EXPECTRES(DISP_E_OVERFLOW, DISP_E_OVERFLOW)
|
||||
#define EXPECT_MISMATCH EXPECTRES(DISP_E_TYPEMISMATCH,DISP_E_TYPEMISMATCH)
|
||||
@ -65,7 +65,7 @@ static HMODULE hOleaut32;
|
||||
#define EXPECT_GT EXPECTRES(VARCMP_GT, VARCMP_GT)
|
||||
#define EXPECT_EQ EXPECTRES(VARCMP_EQ, VARCMP_EQ)
|
||||
#define EXPECT_DBL(x) \
|
||||
ok(hres == S_OK && fabs(out-(x))<1e-14, "expected " #x ", got %16.16g; hres=0x%08lx", out, hres)
|
||||
ok(hres == S_OK && fabs(out-(x))<1e-14, "expected " #x ", got %16.16g; hres=0x%08lx\n", out, hres)
|
||||
|
||||
#define CONVERT(func, val) in = val; hres = p##func(in, &out)
|
||||
#define CONVERTRANGE(func,start,end) for (i = start; i < end; i+=1) { CONVERT(func, i); EXPECT(i); };
|
||||
@ -2082,17 +2082,17 @@ static void test_VarUI4ChangeTypeEx(void)
|
||||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) \
|
||||
ok(hres == S_OK || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected hres " #x ", got hres=0x%08lx", hres)
|
||||
"expected hres " #x ", got hres=0x%08lx\n", hres)
|
||||
|
||||
#define EXPECTI8(x) \
|
||||
ok((hres == S_OK && out == (CONV_TYPE)(x)), \
|
||||
"expected " #x "(%lu,%lu), got (%lu,%lu); hres=0x%08lx", \
|
||||
"expected " #x "(%lu,%lu), got (%lu,%lu); hres=0x%08lx\n", \
|
||||
(ULONG)((LONG64)(x) >> 32), (ULONG)((x) & 0xffffffff), \
|
||||
(ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres)
|
||||
|
||||
#define EXPECTI864(x,y) \
|
||||
ok(hres == S_OK && (out >> 32) == (CONV_TYPE)(x) && (out & 0xffffffff) == (CONV_TYPE)(y), \
|
||||
"expected " #x "(%lu,%lu), got (%lu,%lu); hres=0x%08lx", \
|
||||
"expected " #x "(%lu,%lu), got (%lu,%lu); hres=0x%08lx\n", \
|
||||
(ULONG)(x), (ULONG)(y), \
|
||||
(ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres)
|
||||
|
||||
@ -3378,15 +3378,15 @@ static void test_VarDateChangeTypeEx(void)
|
||||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) \
|
||||
ok(hres == S_OK || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected hres " #x ", got hres=0x%08lx", hres)
|
||||
"expected hres " #x ", got hres=0x%08lx\n", hres)
|
||||
|
||||
#define EXPECTCY(x) \
|
||||
ok((hres == S_OK && out.int64 == (LONGLONG)(x*CY_MULTIPLIER)), \
|
||||
"expected " #x "*CY_MULTIPLIER, got (%8lx %8lx); hres=0x%08lx", out.s.Hi, out.s.Lo, hres)
|
||||
"expected " #x "*CY_MULTIPLIER, got (%8lx %8lx); hres=0x%08lx\n", out.s.Hi, out.s.Lo, hres)
|
||||
|
||||
#define EXPECTCY64(x,y) \
|
||||
ok(hres == S_OK && out.s.Hi == (long)x && out.s.Lo == y, \
|
||||
"expected " #x #y "(%lu,%lu), got (%lu,%lu); hres=0x%08lx", \
|
||||
"expected " #x #y "(%lu,%lu), got (%lu,%lu); hres=0x%08lx\n", \
|
||||
(ULONG)(x), (ULONG)(y), out.s.Hi, out.s.Lo, hres)
|
||||
|
||||
static void test_VarCyFromI1(void)
|
||||
@ -3877,7 +3877,7 @@ static void test_VarCyInt(void)
|
||||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) \
|
||||
ok(hres == S_OK || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected hres " #x ", got hres=0x%08lx", hres)
|
||||
"expected hres " #x ", got hres=0x%08lx\n", hres)
|
||||
|
||||
#define EXPECTDEC(scl, sgn, hi, lo) ok(hres == S_OK && \
|
||||
out.u.s.scale == (BYTE)(scl) && out.u.s.sign == (BYTE)(sgn) && \
|
||||
@ -4199,7 +4199,7 @@ static void test_VarDecCmp(void)
|
||||
#undef _EXPECTRES
|
||||
#define _EXPECTRES(res, x, fs) \
|
||||
ok((hres == S_OK && out == (CONV_TYPE)(x)) || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected " #x ", got " fs "; hres=0x%08lx", out, hres)
|
||||
"expected " #x ", got " fs "; hres=0x%08lx\n", out, hres)
|
||||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d")
|
||||
#undef CONVERTRANGE
|
||||
|
Loading…
Reference in New Issue
Block a user