projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change the use of CFLAGS WRT ACX_PTHREAD. Thread libs/cflags are
[yaz-moved-to-github.git]
/
test
/
tstnmem.c
diff --git
a/test/tstnmem.c
b/test/tstnmem.c
index
0949749
..
930d18c
100644
(file)
--- a/
test/tstnmem.c
+++ b/
test/tstnmem.c
@@
-1,8
+1,8
@@
/*
/*
- * Copyright (C) 1995-2005, Index Data ApS
+ * Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
* See the file LICENSE for details.
*
- * $Id: tstnmem.c,v 1.5 2005-06-25 15:46:07 adam Exp $
+ * $Id: tstnmem.c,v 1.7 2007-01-03 08:42:16 adam Exp $
*/
#if HAVE_CONFIG_H
*/
#if HAVE_CONFIG_H
@@
-15,22
+15,22
@@
#include <ctype.h>
#include <yaz/nmem.h>
#include <ctype.h>
#include <yaz/nmem.h>
+#include <yaz/test.h>
-int main (int argc, char **argv)
+void tst(void)
{
{
- void *cp;
NMEM n;
int j;
NMEM n;
int j;
+ char *cp;
nmem_init();
n = nmem_create();
nmem_init();
n = nmem_create();
- if (!n)
- exit (1);
+ YAZ_CHECK(n);
+
for (j = 1; j<500; j++)
{
cp = nmem_malloc(n, j);
for (j = 1; j<500; j++)
{
cp = nmem_malloc(n, j);
- if (!cp)
- exit(2);
+ YAZ_CHECK(cp);
if (sizeof(long) >= j)
*(long*) cp = 123L;
#if HAVE_LONG_LONG
if (sizeof(long) >= j)
*(long*) cp = 123L;
#if HAVE_LONG_LONG
@@
-44,12
+44,17
@@
int main (int argc, char **argv)
for (j = 2000; j<20000; j+= 2000)
{
cp = nmem_malloc(n, j);
for (j = 2000; j<20000; j+= 2000)
{
cp = nmem_malloc(n, j);
- if (!cp)
- exit(3);
+ YAZ_CHECK(cp);
}
nmem_destroy(n);
nmem_exit();
}
nmem_destroy(n);
nmem_exit();
- exit(0);
+}
+
+int main (int argc, char **argv)
+{
+ YAZ_CHECK_INIT(argc, argv);
+ tst();
+ YAZ_CHECK_TERM;
}
/*
* Local variables:
}
/*
* Local variables: