|
Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
|
#include "opt_diags.h"#include "opt_lines.h"#include "opt_trace.h"#include "opt_types.h"#include <rw_cmdopt.h>#include <rw_printf.h>#include <assert.h>#include <ctype.h>#include <setjmp.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/resource.h>#include <rw_driver.h>
Go to the source code of this file.
Macros | |
| #define | _RWSTD_TEST_SRC |
| #define | RLIM_SAVED_CUR RLIM_INFINITY |
| #define | RLIM_SAVED_MAX RLIM_INFINITY |
| #define | _RWSTD_TEST_SRC |
| #define | RW_TEST_STRSTR(x) #x |
| #define | RW_TEST_STR(x) RW_TEST_STRSTR(x) |
| #define | RW_TEST_COMPILER "unknown" |
| #define | RW_TEST_ARCH "unknown" |
| #define | RW_TEST_OS "unknown" |
| #define | RW_TEST_HARDWARE RW_TEST_ARCH " running " RW_TEST_OS |
| #define | CHECK_INIT(init, func) _rw_check_init (init, __LINE__, func) |
Functions | |
| _RWSTD_DLLIMPORT int() | fileno (FILE *) _LIBC_THROWS() |
| _TEST_EXPORT int | rw_vasnprintf (char **, size_t *, const char *, va_list) |
| _TEST_EXPORT int | rw_vsetopts (const char *opts, va_list va) |
| _TEST_EXPORT int | rw_vtest (int argc, char **argv, const char *file_name, const char *clause, const char *comment, int(*fun)(int, char **), const char *optstr, va_list va) |
| _TEST_EXPORT int | rw_test (int argc, char **argv, const char *fname, const char *clause, const char *comment, int(*testfun)(int, char **), const char *optstr,...) |
| _TEST_EXPORT int | rw_fatal (int success, const char *file, int line, const char *fmt,...) |
| _TEST_EXPORT int | rw_error (int success, const char *file, int line, const char *fmt,...) |
| _TEST_EXPORT int | rw_assert (int success, const char *file, int line, const char *fmt,...) |
| _TEST_EXPORT int | rw_warn (int success, const char *file, int line, const char *fmt,...) |
| _TEST_EXPORT int | rw_note (int success, const char *file, int line, const char *fmt,...) |
| _TEST_EXPORT int | rw_info (int success, const char *file, int line, const char *fmt,...) |
| _TEST_EXPORT bool | rw_enable (int(*fun)(int, const char *, int, const char *,...), bool enable) |
| #define _RWSTD_TEST_SRC |
driver.cpp - definitions of the test driver
$Id$
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2005-2008 Rogue Wave Software, Inc.
Definition at line 30 of file driver.cpp.
| #define _RWSTD_TEST_SRC |
driver.cpp - definitions of the test driver
$Id$
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2005-2008 Rogue Wave Software, Inc.
Definition at line 30 of file driver.cpp.
Definition at line 379 of file driver.cpp.
| #define RLIM_SAVED_CUR RLIM_INFINITY |
Definition at line 61 of file driver.cpp.
| #define RLIM_SAVED_MAX RLIM_INFINITY |
Definition at line 65 of file driver.cpp.
| #define RW_TEST_ARCH "unknown" |
Definition at line 268 of file driver.cpp.
| #define RW_TEST_COMPILER "unknown" |
Definition at line 171 of file driver.cpp.
| #define RW_TEST_HARDWARE RW_TEST_ARCH " running " RW_TEST_OS |
Definition at line 330 of file driver.cpp.
| #define RW_TEST_OS "unknown" |
Definition at line 327 of file driver.cpp.
| #define RW_TEST_STR | ( | x | ) | RW_TEST_STRSTR(x) |
Definition at line 87 of file driver.cpp.
Definition at line 86 of file driver.cpp.
| _RWSTD_DLLIMPORT int() fileno | ( | FILE * | ) |
| _TEST_EXPORT int rw_assert | ( | int | success, |
| const char * | file, | ||
| int | line, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Records and optionally issues a diagnostic of severity 7.
Definition at line 1630 of file driver.cpp.
| _TEST_EXPORT bool rw_enable | ( | int(*)(int, const char *, int, const char *,...) | fun, |
| bool | enable = true |
||
| ) |
Enable/disable the specified diagnostic.
| fun | Diagnostic function to enable or disable. Must be one of rw_fatal, rw_error, rw_assert, rw_warn, rw_note or rw_info. |
| enable | Flag to indicate that the diagnostic function should be enabled or disabled. |
Example: rw_enable (rw_error, false); // disable all rw_error diagnostics rw_enable (rw_error); // enable all rw_error diagnostics
Definition at line 1698 of file driver.cpp.
| _TEST_EXPORT int rw_error | ( | int | success, |
| const char * | file, | ||
| int | line, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Records and optionally issues a diagnostic of severity 8.
Definition at line 1613 of file driver.cpp.
| _TEST_EXPORT int rw_fatal | ( | int | expr, |
| const char * | filename, | ||
| int | line, | ||
| const char * | fmtspec, | ||
| ... | |||
| ) |
Records and optionally issues a diagnostic of the highest severity 9.
| expr | A zero value denoting an active diagnostic or any non-zero vaue denoting an inactive diagnostic. |
| filename | An optional name of the file invoking the function. The argument may be null. |
| line | When positive, denotes the line number of the location relevant to the diagnostic. Negative values are ignored. |
| fmtspec | A printf format specifier (with extensions) used to format the text of the diagnostic. See rwtest-fmtspec page for details. |
| ... | Optional list of values to format. |
Every diagnostic is recorded but only active diagnostics may be issued, depending on the setting of the diagnosable severity. The value of the first argument determines whether a diagnostc is active or inactive. Unlike the remaining diagnostic functions, rw_fatal doesn't return to the caller when expr is 0 (i.e., when the diagnostic is active). Instead, it causes the driver the exit the process with the staus equal to 9, the severity of the diagnostic.
Definition at line 1596 of file driver.cpp.
| _TEST_EXPORT int rw_info | ( | int | success, |
| const char * | file, | ||
| int | line, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Records and optionally issues a diagnostic of severity 1.
Definition at line 1681 of file driver.cpp.
| _TEST_EXPORT int rw_note | ( | int | success, |
| const char * | file, | ||
| int | line, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Records and optionally issues a diagnostic of severity 2.
Definition at line 1664 of file driver.cpp.
| _TEST_EXPORT int rw_test | ( | int | argc, |
| char ** | argv, | ||
| const char * | fname, | ||
| const char * | clause, | ||
| const char * | comment, | ||
| int(*)(int, char **) | testfun, | ||
| const char * | optstr, | ||
| ... | |||
| ) |
Definition at line 1278 of file driver.cpp.
| _TEST_EXPORT int rw_vasnprintf | ( | char ** | pbuf, |
| size_t * | pbufsize, | ||
| const char * | fmt, | ||
| va_list | varg | ||
| ) |
Definition at line 946 of file printf.cpp.
| _TEST_EXPORT int rw_vsetopts | ( | const char * | opts, |
| va_list | va | ||
| ) |
Definition at line 450 of file cmdopt.cpp.
| _TEST_EXPORT int rw_vtest | ( | int | argc, |
| char ** | argv, | ||
| const char * | file_name, | ||
| const char * | clause, | ||
| const char * | comment, | ||
| int(*)(int, char **) | fun, | ||
| const char * | optstr, | ||
| va_list | va | ||
| ) |
Definition at line 1070 of file driver.cpp.
| _TEST_EXPORT int rw_warn | ( | int | success, |
| const char * | file, | ||
| int | line, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Records and optionally issues a diagnostic of severity 5.
Definition at line 1647 of file driver.cpp.