~ubuntu-branches/ubuntu/quantal/ncbi-tools6/quantal

« back to all changes in this revision

Viewing changes to connect/test/test_ncbi_heapmgr.c

  • Committer: Package Import Robot
  • Author(s): Aaron M. Ucko, Andreas Tille
  • Date: 2012-06-24 22:54:29 UTC
  • mfrom: (15.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20120624225429-b91zwa0d9xanjlqb
Tags: 6.1.20120620-2
[ Andreas Tille ]
debian/upstream: Strings containing ': ' need to be quoted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: test_ncbi_heapmgr.c,v 6.22 2011/06/10 03:44:32 kazimird Exp $
 
1
/* $Id: test_ncbi_heapmgr.c,v 6.23 2012/04/19 16:09:32 kazimird Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
91
91
    }
92
92
    CORE_LOGF(eLOG_Note,
93
93
              ("%d block%s total; total size %u", i, &"s"[i == 1], total));
 
94
    if (HEAP_Size(heap) != total)
 
95
        CORE_LOG(eLOG_Fatal, "Heap size mismatch");
94
96
}
95
97
 
96
98
 
109
111
    else
110
112
        g_NCBI_ConnectRandomSeed = (int) time(0) ^ NCBI_CONNECT_SRAND_ADDEND;
111
113
    CORE_LOGF(eLOG_Note, ("Using seed %d", g_NCBI_ConnectRandomSeed));
112
 
    HEAP_Options(eOff/*slow*/, eOn/*newalk*/);
 
114
    HEAP_Options(eOff/*slow*/, eDefault);
113
115
    srand(g_NCBI_ConnectRandomSeed);
114
116
    for (j = 1;  j <= 3;  j++) {
115
117
        CORE_LOGF(eLOG_Note, ("Creating heap %d", j));
225
227
 
226
228
                CORE_LOG(eLOG_Note, "Trimming heap");
227
229
                newheap = HEAP_Trim(heap);
228
 
                CORE_LOGF(eLOG_Note,
 
230
                CORE_LOGF(newheap ? eLOG_Note : eLOG_Error,
229
231
                          ("Heap %strimmed: %u -> %u", newheap ? "" : "NOT ",
230
232
                           size, HEAP_Size(newheap)));
231
233
                if (newheap) {