yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame^] | 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 | #ifndef TEST_UTIL
|
| 17 | #define TEST_UTIL
|
| 18 |
|
| 19 |
|
| 20 | #include <cwmp/types.h>
|
| 21 | #include <cwmp/pool.h>
|
| 22 | #include <cwmp/cfg.h>
|
| 23 | #include <cwmp/session.h>
|
| 24 | #include <cwmp/log.h>
|
| 25 | #include <cwmp/event.h>
|
| 26 | #include <cwmp/queue.h>
|
| 27 | #include <cwmp/buffer.h>
|
| 28 | #include <cwmp/cwmp.h>
|
| 29 | #include <cwmp/model.h>
|
| 30 | #include "abts.h"
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 | /* XXX FIXME */
|
| 35 | #ifdef WIN32
|
| 36 | #define EXTENSION ".exe"
|
| 37 | #elif NETWARE
|
| 38 | #define EXTENSION ".nlm"
|
| 39 | #else
|
| 40 | #define EXTENSION
|
| 41 | #endif
|
| 42 |
|
| 43 |
|
| 44 | #define STRING_MAX 8096
|
| 45 |
|
| 46 | /* Some simple functions to make the test apps easier to write and
|
| 47 | * a bit more consistent...
|
| 48 | */
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 | /* Assert that RV is an APR_SUCCESS value; else fail giving strerror
|
| 53 | * for RV and CONTEXT message. */
|
| 54 | void assert_success(abts_case* tc, const char *context,
|
| 55 | int rv, int lineno);
|
| 56 | #define ASSERT_SUCCESS(tc, ctxt, rv) \
|
| 57 | assert_success(tc, ctxt, rv, __LINE__)
|
| 58 |
|
| 59 | void initialize(void);
|
| 60 |
|
| 61 |
|
| 62 | abts_suite *testsuite_model(abts_suite *suite);
|
| 63 | abts_suite *testsuite_rpc(abts_suite *suite);
|
| 64 | abts_suite *testsuite_pool(abts_suite *suite);
|
| 65 |
|
| 66 | #endif /* APR_TEST_INCLUDES */
|
| 67 |
|
| 68 |
|