1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-25 05:52:42 -08:00
emacs/mps/src/poolncv.c
David Jones 6f52ef61a4 Too few args to spacecreate
Copied from Perforce
 Change: 15882
 ServerID: perforce.ravenbrook.com
1996-07-05 09:58:12 +01:00

47 lines
874 B
C

/* impl.c.poolncv
*
* NULL POOL COVERAGE TEST
*
* $HopeName: MMsrc!poolncv.c(trunk.3) $
*
* Copyright (C) 1995 Harlequin Group, all rights reserved
*
*/
#include "mpm.h"
#include "pooln.h"
#include "testlib.h"
#include <stdio.h>
int
main(void)
{
Bool eflag = FALSE;
Space space;
Pool pool;
Res res;
Addr p;
die(SpaceCreate(&space, (Addr)0, (Size)0), "SpaceCreate");
die(PoolCreate(&pool, PoolClassN(), space), "PoolNCreate");
res = PoolAlloc(&p, pool, 1);
if(res == ResOK) {
fprintf(stderr,
"Error: Unexpectedly succeeded in"
"allocating block from PoolN\n");
eflag = TRUE;
}
PoolDestroy(pool);
SpaceDestroy(space);
if(eflag) {
fprintf(stderr, "Conclusion: Defects found.\n");
} else {
fprintf(stderr, "Conclusion: Failed to find any defects.\n");
}
return 0;
}