mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Fixed buffer tests.
This commit is contained in:
parent
b51d1cea7b
commit
a00f9dda7e
@ -172,7 +172,7 @@ TestMallocBuffers(PRUint32 growByPages, PRUint32 pageCount)
|
|||||||
rv = NS_NewBuffer(&buffer,
|
rv = NS_NewBuffer(&buffer,
|
||||||
NS_PAGEMGR_PAGE_SIZE * growByPages,
|
NS_PAGEMGR_PAGE_SIZE * growByPages,
|
||||||
NS_PAGEMGR_PAGE_SIZE * pageCount,
|
NS_PAGEMGR_PAGE_SIZE * pageCount,
|
||||||
nsnull);
|
nsnull);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
printf("failed to create buffer\n");
|
printf("failed to create buffer\n");
|
||||||
return rv;
|
return rv;
|
||||||
@ -192,7 +192,7 @@ TestPageBuffers(PRUint32 growByPages, PRUint32 pageCount)
|
|||||||
rv = NS_NewPageBuffer(&buffer,
|
rv = NS_NewPageBuffer(&buffer,
|
||||||
NS_PAGEMGR_PAGE_SIZE * growByPages,
|
NS_PAGEMGR_PAGE_SIZE * growByPages,
|
||||||
NS_PAGEMGR_PAGE_SIZE * pageCount,
|
NS_PAGEMGR_PAGE_SIZE * pageCount,
|
||||||
nsnull);
|
nsnull);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
printf("failed to create buffer\n");
|
printf("failed to create buffer\n");
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -169,7 +169,7 @@ main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// test for small buffers
|
// test for small buffers
|
||||||
rv = NS_NewPipe(&in, &out, 12, 24, PR_FALSE, nsnull);
|
rv = NS_NewPipe(&in, &out, 12, 24, PR_TRUE, nsnull);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
printf("NewPipe failed\n");
|
printf("NewPipe failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
@ -184,7 +184,7 @@ main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// test for large buffers
|
// test for large buffers
|
||||||
rv = NS_NewPipe(&in, &out, 4096, 4096*16, PR_FALSE, nsnull);
|
rv = NS_NewPipe(&in, &out, 4096, 4096*16, PR_TRUE, nsnull);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
printf("NewPipe failed\n");
|
printf("NewPipe failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user