~ubuntu-branches/ubuntu/oneiric/ncbi-tools6/oneiric

« back to all changes in this revision

Viewing changes to connect/test/test_ncbi_heapmgr.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2011-02-13 15:07:22 UTC
  • mfrom: (5.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110213150722-0ua6hh0mua84jxr5
Tags: 6.1.20100808-2
Reupload to unstable following the release of Debian 6.0 (squeeze).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  $Id: test_ncbi_heapmgr.c,v 6.18 2006/11/21 14:47:58 lavr Exp $
 
1
/* $Id: test_ncbi_heapmgr.c,v 6.21 2010/02/05 20:35:04 kazimird Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
30
30
 *
31
31
 */
32
32
 
33
 
#include "../ncbi_priv.h"
34
33
#include <connect/ncbi_heapmgr.h>
 
34
#include "../ncbi_priv.h"               /* CORE logging facilities */
35
35
#include <stdlib.h>
36
36
#include <string.h>
37
37
#include <time.h>
106
106
    HEAP heap;
107
107
    char* c;
108
108
 
109
 
    /* CORE_SetLOGFormatFlags(fLOG_None | fLOG_Level | fLOG_OmitNoteLevel); */
 
109
    CORE_SetLOGFormatFlags(fLOG_None          | fLOG_Level   |
 
110
                           fLOG_OmitNoteLevel | fLOG_DateTime);
110
111
    CORE_SetLOGFILE(stderr, 0/*false*/);
111
112
    if (argc > 1)
112
113
        g_NCBI_ConnectRandomSeed = atoi(argv[1]);
241
242
        HEAP_Destroy(heap);
242
243
        CORE_LOGF(eLOG_Note, ("Heap %d done", j));
243
244
    }
244
 
    CORE_LOG(eLOG_Note, "Test completed");
 
245
    CORE_LOG(eLOG_Note, "TEST completed successfully");
245
246
    CORE_SetLOG(0);
246
247
    return 0;
247
248
}
248
 
 
249
 
 
250
 
/*
251
 
 * --------------------------------------------------------------------------
252
 
 * $Log: test_ncbi_heapmgr.c,v $
253
 
 * Revision 6.18  2006/11/21 14:47:58  lavr
254
 
 * Implement correct fast freeing and fast allocation checks
255
 
 *
256
 
 * Revision 6.17  2006/11/20 17:25:00  lavr
257
 
 * Test extended to use HEAP_FreeFast() and HEAP_AttachFast()
258
 
 *
259
 
 * Revision 6.16  2006/11/20 16:42:31  lavr
260
 
 * Test extended to be more thorough
261
 
 *
262
 
 * Revision 6.15  2006/03/05 17:42:10  lavr
263
 
 * Adjust for revised API
264
 
 *
265
 
 * Revision 6.14  2005/07/11 18:24:46  lavr
266
 
 * Spell ADDEND
267
 
 *
268
 
 * Revision 6.13  2005/05/02 16:12:32  lavr
269
 
 * Use global random seed
270
 
 *
271
 
 * Revision 6.12  2003/08/25 14:58:10  lavr
272
 
 * Adjust test to take advantage of modified API
273
 
 *
274
 
 * Revision 6.11  2003/07/31 17:54:16  lavr
275
 
 * +HEAP_Trim() test
276
 
 *
277
 
 * Revision 6.10  2003/02/27 15:34:35  lavr
278
 
 * Log moved to end
279
 
 *
280
 
 * Revision 6.9  2002/04/15 19:21:44  lavr
281
 
 * +#include "../test/test_assert.h"
282
 
 *
283
 
 * Revision 6.8  2001/07/03 20:53:38  lavr
284
 
 * HEAP_Copy() test added
285
 
 *
286
 
 * Revision 6.7  2001/06/19 19:12:04  lavr
287
 
 * Type change: size_t -> TNCBI_Size; time_t -> TNCBI_Time
288
 
 *
289
 
 * Revision 6.6  2001/01/23 23:22:05  lavr
290
 
 * Patched logging (in a few places)
291
 
 *
292
 
 * Revision 6.5  2001/01/12 23:59:53  lavr
293
 
 * Message logging modified for use LOG facility only
294
 
 *
295
 
 * Revision 6.4  2000/12/29 18:23:42  lavr
296
 
 * getpagesize() replaced by a constant 4096, which is "more portable".
297
 
 *
298
 
 * Revision 6.3  2000/05/31 23:12:32  lavr
299
 
 * First try to assemble things together to get working service mapper
300
 
 *
301
 
 * Revision 6.2  2000/05/16 15:21:03  lavr
302
 
 * Cleaned up with format - argument correspondence; #include <time.h> added
303
 
 *
304
 
 * Revision 6.1  2000/05/12 19:35:13  lavr
305
 
 * First working revision
306
 
 *
307
 
 * ==========================================================================
308
 
 */