40#define MAX_LOOPS 100000
43 "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
51#ifdef _RWSTD_REENTRANT
63thread_func (
void *
arg)
78 const char*
const expect0_data = expect0.data ();
79 const std::size_t expect0_len = expect0.length ();
81 const char*
const expect1_data = expect1.data ();
82 const std::size_t expect1_len = expect1.length ();
95 RW_ASSERT (expect0_len == local0.length ());
96 RW_ASSERT (expect1_len == local1.length ());
113 rw_info (0, 0, 0,
"running %d thread%{?}s%{;}, %d iteration%{?}s%{;} each",
122 "rw_thread_pool(0, %d, 0, %{#f}, 0) failed",
126 "shared empty string modifed: expected \"\", got %{#S}",
129 const std::string expect (64,
'_');
132 0, 0,
"shared non-empty string modifed: "
133 "expected %{#S}, got %{#S}",
141int main (
int argc,
char *argv[])
143 return rw_test (argc, argv, __FILE__,
144 "lib.string.push_back",
const std::string shared1(64, '_')
const std::string shared0
void run_test(const ForwardIterator &dummy, T *, Predicate *pred)
_TEST_EXPORT int rw_test(int argc, char *argv[], const char *filename, const char *clause, const char *comment, int(*testfun)(int, char **), const char *optspec,...)
_TEST_EXPORT int rw_info(int, const char *, int, const char *,...)
_TEST_EXPORT int rw_assert(int, const char *, int, const char *,...)
_TEST_EXPORT int rw_error(int, const char *, int, const char *,...)
_TEST_EXPORT int rw_thread_pool(rw_thread_t *, _RWSTD_SIZE_T, rw_thread_attr_t *, rw_thread_proc *, void **, _RWSTD_SIZE_T=0)
_TEST_EXPORT int rw_strncmp(const char *, const char *, _RWSTD_SIZE_T=_RWSTD_SIZE_MAX, int=CMP_NULTERM)