testutil.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. #include "fspr_pools.h"
  17. #include "abts.h"
  18. #ifndef APR_TEST_UTIL
  19. #define APR_TEST_UTIL
  20. /* XXX FIXME */
  21. #ifdef WIN32
  22. #define EXTENSION ".exe"
  23. #elif NETWARE
  24. #define EXTENSION ".nlm"
  25. #else
  26. #define EXTENSION
  27. #endif
  28. #define STRING_MAX 8096
  29. /* Some simple functions to make the test apps easier to write and
  30. * a bit more consistent...
  31. */
  32. extern fspr_pool_t *p;
  33. /* Assert that RV is an APR_SUCCESS value; else fail giving strerror
  34. * for RV and CONTEXT message. */
  35. void fspr_assert_success(abts_case* tc, const char *context,
  36. fspr_status_t rv, int lineno);
  37. #define APR_ASSERT_SUCCESS(tc, ctxt, rv) \
  38. fspr_assert_success(tc, ctxt, rv, __LINE__)
  39. void initialize(void);
  40. abts_suite *testatomic(abts_suite *suite);
  41. abts_suite *testdir(abts_suite *suite);
  42. abts_suite *testdso(abts_suite *suite);
  43. abts_suite *testdup(abts_suite *suite);
  44. abts_suite *testenv(abts_suite *suite);
  45. abts_suite *testfile(abts_suite *suite);
  46. abts_suite *testfilecopy(abts_suite *suite);
  47. abts_suite *testfileinfo(abts_suite *suite);
  48. abts_suite *testflock(abts_suite *suite);
  49. abts_suite *testfmt(abts_suite *suite);
  50. abts_suite *testfnmatch(abts_suite *suite);
  51. abts_suite *testgetopt(abts_suite *suite);
  52. abts_suite *testglobalmutex(abts_suite *suite);
  53. abts_suite *testhash(abts_suite *suite);
  54. abts_suite *testipsub(abts_suite *suite);
  55. abts_suite *testlock(abts_suite *suite);
  56. abts_suite *testlfs(abts_suite *suite);
  57. abts_suite *testmmap(abts_suite *suite);
  58. abts_suite *testnames(abts_suite *suite);
  59. abts_suite *testoc(abts_suite *suite);
  60. abts_suite *testpath(abts_suite *suite);
  61. abts_suite *testpipe(abts_suite *suite);
  62. abts_suite *testpoll(abts_suite *suite);
  63. abts_suite *testpool(abts_suite *suite);
  64. abts_suite *testproc(abts_suite *suite);
  65. abts_suite *testprocmutex(abts_suite *suite);
  66. abts_suite *testrand(abts_suite *suite);
  67. abts_suite *testrand2(abts_suite *suite);
  68. abts_suite *testsleep(abts_suite *suite);
  69. abts_suite *testshm(abts_suite *suite);
  70. abts_suite *testsock(abts_suite *suite);
  71. abts_suite *testsockets(abts_suite *suite);
  72. abts_suite *testsockopt(abts_suite *suite);
  73. abts_suite *teststr(abts_suite *suite);
  74. abts_suite *teststrnatcmp(abts_suite *suite);
  75. abts_suite *testtable(abts_suite *suite);
  76. abts_suite *testtemp(abts_suite *suite);
  77. abts_suite *testthread(abts_suite *suite);
  78. abts_suite *testtime(abts_suite *suite);
  79. abts_suite *testud(abts_suite *suite);
  80. abts_suite *testuser(abts_suite *suite);
  81. abts_suite *testvsn(abts_suite *suite);
  82. #endif /* APR_TEST_INCLUDES */