Commit 231fbff8 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Add trailing '\n's to ok() calls.

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