1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | /* $Id$ */ |
---|
3 | |
---|
4 | #ifndef INCL_FTEST_UTIL_H |
---|
5 | #define INCL_FTEST_UTIL_H |
---|
6 | |
---|
7 | //{{{ docu |
---|
8 | // |
---|
9 | // ftest_util.h - header to ftest_util.cc. |
---|
10 | // |
---|
11 | //}}} |
---|
12 | |
---|
13 | enum ftestStatusT { |
---|
14 | Passed = 0, Failed, UndefinedResult |
---|
15 | }; |
---|
16 | |
---|
17 | //{{{ enum ftestErrorT |
---|
18 | //{{{ docu |
---|
19 | // |
---|
20 | // enum ftestErrorT - FTE error types. |
---|
21 | // |
---|
22 | // noError: no error (rarely used :-) |
---|
23 | // CommandlineError: commandline syntax error |
---|
24 | // EnvSyntaxError: error in environment specification |
---|
25 | // FileError: error reading some file |
---|
26 | // CanFormSpecError: error in canonical form specification |
---|
27 | // CheckError: error in result checks |
---|
28 | // SignalError: process received a signal |
---|
29 | // TimeoutError: and this signal was due to our own call to `alarm()' |
---|
30 | // |
---|
31 | //}}} |
---|
32 | enum ftestErrorT |
---|
33 | { |
---|
34 | noError, CommandlineError, EnvSyntaxError, FileError, |
---|
35 | CanFormSpecError, CheckError, |
---|
36 | SignalError, TimeoutError = SignalError + 14 |
---|
37 | }; |
---|
38 | //}}} |
---|
39 | |
---|
40 | extern int ftestCircle; |
---|
41 | extern int ftestAlarm; |
---|
42 | |
---|
43 | extern int ftestCheckFlag; |
---|
44 | extern int ftestPrintFlag; |
---|
45 | extern int ftestPrintResultFlag; |
---|
46 | |
---|
47 | const char * ftestSkipBlancs ( const char * string ); |
---|
48 | char * ftestCutBlancs ( char * string ); |
---|
49 | const char * ftestSubStr ( const char * subString, const char * string ); |
---|
50 | void ftestError ( ftestErrorT errno, const char * format ... ); |
---|
51 | void ftestUsagePrint ( const char * additionalUsage = 0 ); |
---|
52 | |
---|
53 | void ftestSignalCatch ( bool block = false ); |
---|
54 | |
---|
55 | void ftestSetName ( const char * execName, const char * algorithmName, const char * usage ); |
---|
56 | |
---|
57 | void ftestGetOpts ( int argc, char ** argv, int & optind ); |
---|
58 | void ftestGetEnv ( int, char ** argv, int & optind ); |
---|
59 | bool ftestSearchTaggedArg ( int, char ** argv, int & optind, const char * optionTag ); |
---|
60 | void ftestWriteSeed (); |
---|
61 | |
---|
62 | void ftestPrintTimer ( long timer ); |
---|
63 | void ftestPrintCheck ( ftestStatusT check ); |
---|
64 | void ftestPrintEnv (); |
---|
65 | |
---|
66 | #endif /* ! INCL_FTEST_UTIL_H */ |
---|