Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
testutil.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "apr_pools.h"
18 #include "apr_general.h"
19 #include "abts.h"
20 
21 #ifndef APR_TEST_UTIL
22 #define APR_TEST_UTIL
23 
24 /* XXX: FIXME - these all should become much more utilitarian
25  * and part of apr, itself
26  */
27 
28 #ifdef WIN32
29 #ifdef BINPATH
30 #define TESTBINPATH APR_STRINGIFY(BINPATH) "/"
31 #else
32 #define TESTBINPATH ""
33 #endif
34 #else
35 #define TESTBINPATH "./"
36 #endif
37 
38 #ifdef WIN32
39 #define EXTENSION ".exe"
40 #elif NETWARE
41 #define EXTENSION ".nlm"
42 #else
43 #define EXTENSION
44 #endif
45 
46 #define STRING_MAX 8096
47 
48 /* Some simple functions to make the test apps easier to write and
49  * a bit more consistent...
50  */
51 
52 extern apr_pool_t *p;
53 
54 /* Assert that RV is an APR_SUCCESS value; else fail giving strerror
55  * for RV and CONTEXT message. */
56 void apr_assert_success(abts_case* tc, const char *context,
57  apr_status_t rv, int lineno);
58 #define APR_ASSERT_SUCCESS(tc, ctxt, rv) \
59  apr_assert_success(tc, ctxt, rv, __LINE__)
60 
61 void apr_assert_failure(abts_case* tc, const char *context,
62  apr_status_t rv, int lineno);
63 #define APR_ASSERT_FAILURE(tc, ctxt, rv) \
64  apr_assert_failure(tc, ctxt, rv, __LINE__)
65 
66 
67 void initialize(void);
68 
100 abts_suite *testshm(abts_suite *suite);
104 abts_suite *teststr(abts_suite *suite);
110 abts_suite *testud(abts_suite *suite);
112 abts_suite *testvsn(abts_suite *suite);
113 
116 abts_suite *testuri(abts_suite *suite);
121 abts_suite *testmd4(abts_suite *suite);
122 abts_suite *testmd5(abts_suite *suite);
124 abts_suite *testdbd(abts_suite *suite);
130 abts_suite *testxml(abts_suite *suite);
132 abts_suite *testrmm(abts_suite *suite);
133 abts_suite *testdbm(abts_suite *suite);
139 
140 #endif /* APR_TEST_INCLUDES */
abts_suite * testmd4(abts_suite *suite)
abts_suite * testbuckets(abts_suite *suite)
abts_suite * testuser(abts_suite *suite)
abts_suite * testlfs(abts_suite *suite)
abts_suite * testsockopt(abts_suite *suite)
abts_suite * teststr(abts_suite *suite)
abts_suite * testhash(abts_suite *suite)
abts_suite * testlock(abts_suite *suite)
abts_suite * testfnmatch(abts_suite *suite)
abts_suite * testdir(abts_suite *suite)
abts_suite * testxlate(abts_suite *suite)
abts_suite * testflock(abts_suite *suite)
abts_suite * testdbm(abts_suite *suite)
abts_suite * testskiplist(abts_suite *suite)
abts_suite * testpipe(abts_suite *suite)
abts_suite * testfile(abts_suite *suite)
abts_suite * testdate(abts_suite *suite)
abts_suite * testoc(abts_suite *suite)
abts_suite * testvsn(abts_suite *suite)
abts_suite * testjose(abts_suite *suite)
abts_suite * testtemp(abts_suite *suite)
abts_suite * testcond(abts_suite *suite)
abts_suite * testencode(abts_suite *suite)
abts_suite * testhooks(abts_suite *suite)
abts_suite * testmmap(abts_suite *suite)
abts_suite * testmemcache(abts_suite *suite)
APR Miscellaneous library routines.
abts_suite * testfileinfo(abts_suite *suite)
abts_suite * testdbd(abts_suite *suite)
abts_suite * testsiphash(abts_suite *suite)
Definition: abts.h:51
abts_suite * testprocmutex(abts_suite *suite)
abts_suite * testqueue(abts_suite *suite)
abts_suite * testatomic(abts_suite *suite)
APR memory allocation.
abts_suite * testshm(abts_suite *suite)
abts_suite * testud(abts_suite *suite)
abts_suite * testpass(abts_suite *suite)
abts_suite * testbase64(abts_suite *suite)
abts_suite * testescape(abts_suite *suite)
abts_suite * testuri(abts_suite *suite)
abts_suite * testlfsabi(abts_suite *suite)
Definition: abts.h:57
abts_suite * testjson(abts_suite *suite)
abts_suite * teststrmatch(abts_suite *suite)
abts_suite * testcrypto(abts_suite *suite)
abts_suite * testrmm(abts_suite *suite)
abts_suite * testenv(abts_suite *suite)
abts_suite * testglobalmutex(abts_suite *suite)
abts_suite * testsleep(abts_suite *suite)
apr_pool_t * p
void apr_assert_success(abts_case *tc, const char *context, apr_status_t rv, int lineno)
abts_suite * testsock(abts_suite *suite)
abts_suite * testnames(abts_suite *suite)
abts_suite * testredis(abts_suite *suite)
abts_suite * testpath(abts_suite *suite)
abts_suite * testgetopt(abts_suite *suite)
abts_suite * testsockets(abts_suite *suite)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
abts_suite * testuuid(abts_suite *suite)
int apr_status_t
Definition: apr_errno.h:44
abts_suite * testdup(abts_suite *suite)
abts_suite * teststrnatcmp(abts_suite *suite)
abts_suite * testpool(abts_suite *suite)
abts_suite * testrand(abts_suite *suite)
abts_suite * testthread(abts_suite *suite)
abts_suite * testdso(abts_suite *suite)
abts_suite * testreslist(abts_suite *suite)
abts_suite * testxml(abts_suite *suite)
abts_suite * testproc(abts_suite *suite)
abts_suite * testipsub(abts_suite *suite)
abts_suite * testpoll(abts_suite *suite)
abts_suite * testfilecopy(abts_suite *suite)
abts_suite * testtime(abts_suite *suite)
abts_suite * testfmt(abts_suite *suite)
void initialize(void)
abts_suite * testmd5(abts_suite *suite)
void apr_assert_failure(abts_case *tc, const char *context, apr_status_t rv, int lineno)
abts_suite * testtable(abts_suite *suite)