~ubuntu-branches/ubuntu/precise/ncbi-tools6/precise

« back to all changes in this revision

Viewing changes to connect/test/test_ncbi_core.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  $Id: test_ncbi_core.c,v 6.6 2001/08/09 16:25:28 lavr Exp $
 
1
/*  $Id: test_ncbi_core.c,v 6.9 2002/08/14 03:35:26 lavr Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
30
30
 *     ncbi_core.[ch]
31
31
 *     ncbi_util.[ch]
32
32
 *
33
 
 * ---------------------------------------------------------------------------
34
 
 * $Log: test_ncbi_core.c,v $
35
 
 * Revision 6.6  2001/08/09 16:25:28  lavr
36
 
 * Remove last (unneeded) parameter from LOG_Reset() and its test
37
 
 *
38
 
 * Revision 6.5  2001/05/17 17:59:03  vakatov
39
 
 * TEST_UTIL_Log::  Set "errno" to zero before testing LOG_WRITE_ERRNO()
40
 
 *
41
 
 * Revision 6.4  2000/06/23 19:35:51  vakatov
42
 
 * Test the logging of binary data
43
 
 *
44
 
 * Revision 6.3  2000/06/01 18:35:12  vakatov
45
 
 * Dont log with level "eLOG_Fatal" (it exits/coredumps now)
46
 
 *
47
 
 * Revision 6.2  2000/04/07 20:00:51  vakatov
48
 
 * + <errno.h>
49
 
 *
50
 
 * Revision 6.1  2000/02/23 22:37:37  vakatov
51
 
 * Initial revision
52
 
 *
53
 
 * ===========================================================================
54
33
 */
55
34
 
56
 
#if defined(NDEBUG)
57
 
#  undef NDEBUG
58
 
#endif 
59
 
 
60
35
#include <connect/ncbi_util.h>
61
36
#include <stdlib.h>
62
37
#include <errno.h>
 
38
/* This header must go last */
 
39
#include "test_assert.h"
63
40
 
64
41
 
65
42
/* Aux. to printout a name of the next function to test
101
78
{
102
79
  /* EIO_Status, IO_StatusStr() */
103
80
  int x_status;
104
 
  for (x_status = 0;  x_status <= (int)eIO_Unknown;  x_status++) {
 
81
  for (x_status = 0;  x_status <= (int) eIO_Unknown;  x_status++) {
105
82
    switch ( (EIO_Status) x_status ) {
106
83
    case eIO_Success:
107
84
    case eIO_Timeout:
108
85
    case eIO_Closed:
 
86
    case eIO_Interrupt:
109
87
    case eIO_InvalidArg:
110
88
    case eIO_NotSupported:
111
89
    case eIO_Unknown:
227
205
 
228
206
  /* ELOG_Level, LOG_LevelStr() */
229
207
  int x_level;
230
 
  for (x_level = 0;  x_level <= (int)eIO_Unknown;  x_level++) {
 
208
  for (x_level = 0;  x_level <= (int) eLOG_Fatal;  x_level++) {
231
209
    switch ( (ELOG_Level) x_level ) {
232
210
    case eLOG_Trace:
233
211
    case eLOG_Note:
379
357
  TEST_UTIL();
380
358
  return 0;
381
359
}
 
360
 
 
361
 
 
362
/*
 
363
 * ---------------------------------------------------------------------------
 
364
 * $Log: test_ncbi_core.c,v $
 
365
 * Revision 6.9  2002/08/14 03:35:26  lavr
 
366
 * Fix ELOG_Level test; add eIO_Interrupt to EIO_Status test
 
367
 *
 
368
 * Revision 6.8  2002/03/22 19:46:57  lavr
 
369
 * Test_assert.h made last among the include files
 
370
 *
 
371
 * Revision 6.7  2002/01/16 21:23:15  vakatov
 
372
 * Utilize header "test_assert.h" to switch on ASSERTs in the Release mode too
 
373
 *
 
374
 * Revision 6.6  2001/08/09 16:25:28  lavr
 
375
 * Remove last (unneeded) parameter from LOG_Reset() and its test
 
376
 *
 
377
 * Revision 6.5  2001/05/17 17:59:03  vakatov
 
378
 * TEST_UTIL_Log::  Set "errno" to zero before testing LOG_WRITE_ERRNO()
 
379
 *
 
380
 * Revision 6.4  2000/06/23 19:35:51  vakatov
 
381
 * Test the logging of binary data
 
382
 *
 
383
 * Revision 6.3  2000/06/01 18:35:12  vakatov
 
384
 * Dont log with level "eLOG_Fatal" (it exits/coredumps now)
 
385
 *
 
386
 * Revision 6.2  2000/04/07 20:00:51  vakatov
 
387
 * + <errno.h>
 
388
 *
 
389
 * Revision 6.1  2000/02/23 22:37:37  vakatov
 
390
 * Initial revision
 
391
 *
 
392
 * ===========================================================================
 
393
 */