int main (int argc, char *argv[]) { std_log(LOG_FILENAME_LINE,"[Test Case for string assign]"); #ifndef __SYMBIAN32__ return rw_test (argc, argv, __FILE__, "lib.string.assign", 0 /* no comment */, run_test, 0 /* co command line options */); #else rw_test (argc, argv, __FILE__, "lib.string.assign", 0 /* no comment */, run_test, 0 /* co command line options */); if(failures) { assert_failed = true; std_log(LOG_FILENAME_LINE,"Result: Failed"); } else { std_log(LOG_FILENAME_LINE,"Result: Passed"); } std_log(LOG_FILENAME_LINE,"[End Test Case]"); testResultXml("21_string_assign"); close_log_file(); #endif return failures; }
int main (int argc, char *argv[]) { errno_at_startup = errno; std_log(LOG_FILENAME_LINE,"[Test Case for cerrno]"); #ifndef __SYMBIAN32__ return rw_test (argc, argv, __FILE__, "lib.errno", 0 /* no comment */, run_test, 0 /* no command line options */, 0); #else rw_test (argc, argv, __FILE__, "lib.errno", 0 /* no comment */, run_test, 0 /* no command line options */, 0); if(failures) { assert_failed = true; std_log(LOG_FILENAME_LINE,"Result: Failed"); } else { std_log(LOG_FILENAME_LINE,"Result: Passed"); } std_log(LOG_FILENAME_LINE,"[End Test Case]"); testResultXml("19_cerrno"); close_log_file(); #endif }
/* Same test, using shortcut functions. */ int test_1b(duk_context *ctx) { void *buf; duk_set_top(ctx, 0); printf("fixed size, 0 bytes (no guarantee whether ptr NULL or non-NULL)\n"); buf = duk_push_fixed_buffer(ctx, 0); rw_test((unsigned char *) buf, 0); printf("fixed size, 1024 bytes\n"); buf = duk_push_fixed_buffer(ctx, 1024); printf("ptr is non-NULL: %d\n", (buf != NULL ? 1 : 0)); rw_test((unsigned char *) buf, 1024); printf("dynamic size, 0 bytes (no guarantee whether ptr NULL or non-NULL)\n"); buf = duk_push_dynamic_buffer(ctx, 0); rw_test((unsigned char *) buf, 0); printf("dynamic size, 1024 bytes\n"); buf = duk_push_dynamic_buffer(ctx, 1024); printf("ptr is non-NULL: %d\n", (buf != NULL ? 1 : 0)); rw_test((unsigned char *) buf, 1024); printf("final top: %d\n", duk_get_top(ctx)); return 0; }
int main (int argc, char *argv[]) { std_log(LOG_FILENAME_LINE,"[Test Case for fill ]"); #ifndef __SYMBIAN32__ return rw_test (argc, argv, __FILE__, "lib.alg.fill", 0 /* no comment */, run_test, "|-nloops# " "|-no-OutputIterator# " "|-no-ForwardIterator# " "|-no-BidirectionalIterator# " "|-no-RandomAccessIterator#", &rw_opt_nloops, &rw_opt_no_output_iter, &rw_opt_no_fwd_iter, &rw_opt_no_bidir_iter, &rw_opt_no_rnd_iter); #else rw_test (argc, argv, __FILE__, "lib.alg.fill", 0 /* no comment */, run_test, "|-nloops# " "|-no-OutputIterator# " "|-no-ForwardIterator# " "|-no-BidirectionalIterator# " "|-no-RandomAccessIterator#", &rw_opt_nloops, &rw_opt_no_output_iter, &rw_opt_no_fwd_iter, &rw_opt_no_bidir_iter, &rw_opt_no_rnd_iter); if(failures) { assert_failed = true; std_log(LOG_FILENAME_LINE,"Result: Failed"); } else { std_log(LOG_FILENAME_LINE,"Result: Passed"); } std_log(LOG_FILENAME_LINE,"[End Test Case]"); testResultXml("25_fill"); close_log_file(); #endif }
void run_tests(int iter) { testno = 1; snprintf(dirent_name, OCFS2_MAX_FILENAME_LEN, "multi-indexed-dirs-test-%d", iter); snprintf(dir_name, OCFS2_MAX_FILENAME_LEN, "%s/%s", work_place, dirent_name); if (test_flags & GROW_TEST) grow_test(); if (test_flags & RENM_TEST) rw_test(); if (test_flags & READ_TEST) read_test(); if (test_flags & ULNK_TEST) unlink_test(); if (test_flags & FLUP_TEST) fillup_test(); if (test_flags & STRS_TEST) stress_test(); }
/*extern*/ int main (int argc, char* argv []) { return rw_test (argc, argv, __FILE__, "[tuple.cnstr]", "20.3.1.2 Construction", run_test, "", 0); }
/*extern*/ int main (int argc, char* argv []) { return rw_test (argc, argv, __FILE__, "[forward]", "20.2.2 forward/move helpers", run_test, "", 0); }
int main (int argc, char *argv[]) { #ifdef _RWSTD_REENTRANT // set nthreads to the greater of the number of processors // and 2 (for uniprocessor systems) by default opt_nthreads = rw_get_cpus (); if (opt_nthreads < 2) opt_nthreads = 2; #endif // _RWSTD_REENTRANT return rw_test (argc, argv, __FILE__, "lib.locale.money.put", "thread safety", run_test, "|-soft-timeout#0 " // must be non-negative "|-nloops#0 " // must be non-negative "|-nthreads#0-* " // must be in [0, MAX_THREADS] "|-nlocales#0 " // arg must be non-negative "|-locales= " // must be provided "|-shared-locale# ", &opt_timeout, &opt_nloops, int (MAX_THREADS), &opt_nthreads, &opt_nlocales, &rw_opt_setlocales, &opt_shared_locale); }
int main (int argc, char *argv[]) { // FIXME: add command line options to enable/disable each operator return rw_test (argc, argv, __FILE__, "valarray.cassign", 0 /* no comment */, run_test, "|-times~ " "|-divide~ " "|-modulo~ " "|-plus~ " "|-minus~ " "|-xor~ " "|-and~ " "|-or~ " "|-shift_left~ " "|-shift_right~", opt_assign + inx_mul_assign, opt_assign + inx_div_assign, opt_assign + inx_mod_assign, opt_assign + inx_add_assign, opt_assign + inx_sub_assign, opt_assign + inx_xor_assign, opt_assign + inx_and_assign, opt_assign + inx_or_assign, opt_assign + inx_shl_assign, opt_assign + inx_shr_assign, (void*)0 /* sentinel */); }
/*extern*/ int main (int argc, char* argv []) { return rw_test (argc, argv, __FILE__, "[tuple.rel]", "20.3.1.6 Relational operators", run_test, "", 0); }
int main (int argc, char *argv[]) { #ifdef _RWSTD_REENTRANT // set nthreads to the greater of the number of processors // and 2 (for uniprocessor systems) by default opt_nthreads = rw_get_cpus (); if (opt_nthreads < 2) opt_nthreads = 2; #endif // _RWSTD_REENTRANT return rw_test (argc, argv, __FILE__, "lib.locale.cons", "thread safety", run_test, "|-combine~ " "|-nloops#0 " // must be non-negative "|-nthreads#0-* " // must be in [0, MAX_THREADS] "|-locales=", // must be provided &opt_combine, &opt_nloops, int (MAX_THREADS), &opt_nthreads, &rw_opt_setlocales); }
/*extern*/ int main (int argc, char* argv []) { return rw_test (argc, argv, __FILE__, "lib.basic.string", "exception saftety", run_test, "", 0); }
int main (int argc, char* argv []) { return rw_test (argc, argv, __FILE__, "lib.locale.money.get", 0 /* no comment */, run_test, "|-no-basic_string#", &no_basic_string); }
int main (int argc, char** argv) { return rw_test (argc, argv, __FILE__, "lib.deque.special", 0 /* no comment */, run_test, 0 /* co command line options */); }
/*extern*/ int main (int argc, char* argv []) { return rw_test (argc, argv, __FILE__, "[tuple.creation]", "20.3.1.3 Tuple creation functions", run_test, "", 0); }
int main (int argc, char *argv[]) { return rw_test (argc, argv, __FILE__, "meta.rel", 0 /* no comment */, run_test, 0); }
int main (int argc, char *argv[]) { errno_at_startup = errno; return rw_test (argc, argv, __FILE__, "lib.errno", 0 /* no comment */, run_test, 0 /* no command line options */, 0); }
int main (int argc, char *argv[]) { return rw_test (argc, argv, __FILE__, "lib.c.strings", "header <cctype>", run_test, "|-no-behavior#0-1 ", &rw_opt_no_behavior); }
int main (int argc, char *argv[]) { #ifdef _RWSTD_REENTRANT // set nthreads to the greater of the number of processors // and 2 (for uniprocessor systems) by default opt_nthreads = rw_get_cpus (); if (opt_nthreads < 2) opt_nthreads = 2; #endif // _RWSTD_REENTRANT return rw_test (argc, argv, __FILE__, "lib.locale.global.templates", "thread safety", run_test, "|-has_facet~ " "|-use_facet~ " "|-soft-timeout#0 " // must be non-negative "|-nloops#0 " // arg must be non-negative "|-nthreads#0-* " // arg must be in [0, MAX_THREADS] "|-locales= " // argument must be provided "|-no-exceptions# " // disable exceptions "|-codecvt~ " // enable/disable individual facets "|-collate~ " "|-ctype~ " "|-messages~ " "|-moneypunct~ " "|-moneypunct_intl~ " "|-money_get~ " "|-money_put~ " "|-numpunct~ " "|-num_get~ " "|-num_put~ " "|-time_get~ " "|-time_put~ ", &opt_has_facet, &opt_use_facet, &opt_timeout, &opt_nloops, int (MAX_THREADS), &opt_nthreads, &rw_opt_setlocales, &opt_no_exceptions, opt_facets + opt_inx_codecvt, opt_facets + opt_inx_collate, opt_facets + opt_inx_ctype, opt_facets + opt_inx_messages, opt_facets + opt_inx_moneypunct, opt_facets + opt_inx_moneypunct_intl, opt_facets + opt_inx_money_get, opt_facets + opt_inx_money_put, opt_facets + opt_inx_numpunct, opt_facets + opt_inx_num_get, opt_facets + opt_inx_num_put, opt_facets + opt_inx_time_get, opt_facets + opt_inx_time_put); }
int main (int argc, char *argv[]) { return rw_test (argc, argv, __FILE__, 0 /* no section */, 0 /* no comment */, run_test, "", 0); }
int main (int argc, char *argv[]) { return rw_test (argc, argv, __FILE__, "lib.class.gslice", 0 /* no comment */, run_test, "", (void*)0 /* sentinel */); }
int main (int argc, char *argv[]) { // FIXME: add command line options to enable/disable each operator return rw_test (argc, argv, __FILE__, "valarray.cons", 0 /* no comment */, run_test, "", (void*)0 /* sentinel */); }
int main (int argc, char** argv) { return rw_test (argc, argv, __FILE__, "lib.vector.capacity", 0 /* no comment */, run_test, "|-no-exceptions# " "|-nloops#0", &rw_opt_no_exceptions, &rw_opt_nloops); }
int main (int argc, char *argv[]) { return rw_test (argc, argv, __FILE__, 0 /* no clause */, 0 /* no comment */, run_test, "|-nloops#0 " // must be non-negative "|-nthreads#0-*", // must be in [0, MAX_THREADS] &rw_opt_nloops, int (MAX_THREADS), &rw_opt_nthreads); }
int main (int argc, char *argv[]) { #ifdef _MSC_VER // disable GUI window from abort() _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_DEBUG); #endif return rw_test (argc, argv, __FILE__, 0 /* no clause */, 0 /* no comment */, run_test, 0 /* co command line options */); }
int main (int argc, char *argv[]) { return rw_test (argc, argv, __FILE__, "lib.alg.adjacent.find", 0 /* no comment */, run_test, "|-no-ForwardIterator#" "|-no-BidirectionalIterator#" "|-no-RandomAccessIterator#" "|-no-Predicate#", &rw_opt_no_fwd_iter, &rw_opt_no_bidir_iter, &rw_opt_no_rnd_iter, &rw_opt_no_predicate); }
int main (void) { const char *filename = "rw.aifc" ; print_test_name ("aiff_rw_test", filename) ; dump_data_to_file (filename, aifc_data, sizeof (aifc_data)) ; rw_test (filename) ; unlink (filename) ; puts ("ok") ; return 0 ; } /* main */
int main (int argc, char *argv[]) { #ifdef _MSC_VER // disable "Invalid allocation size: 4294967292 bytes" // message box from malloc() _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_DEBUG); #endif return rw_test (argc, argv, __FILE__, "lib.temporary.buffer", 0 /* no comment */, run_test, "", (void*)0 /* sentinel */); }
int main (int argc, char *argv[]) { return rw_test (argc, argv, __FILE__, "lib.alg.mismatch", 0 /* no comment */, run_test, "|-nloops#" "|-no-InputIterator#" "|-no-ForwardIterator#" "|-no-BidirectionalIterator#" "|-no-RandomAccessIterator#" "|-no-Predicate", &rw_opt_nloops, &rw_opt_no_input_iter, &rw_opt_no_fwd_iter, &rw_opt_no_bidir_iter, &rw_opt_no_rnd_iter, &rw_opt_no_predicate); }
int main (int argc, char *argv[]) { return rw_test (argc, argv, __FILE__, "istream.formatted.arithmetic", 0 /* no comment */, run_test, "|-char~ " "|-wchar_t~ " "|-char_traits~ " "|-UserTraits~ " "|-bool~ " "|-short~ " "|-unsigned-short~ " "|-int~ " "|-unsigned-int~ " "|-long~ " "|-unsigned-long~ " "|-long-long~ " "|-unsigned-long-long~ " "|-float~ " "|-double~ " "|-long-double~ " "|-no-gcount# ", &opt_char, &opt_wchar, &opt_char_traits, &opt_user_traits, &opt_bool, &opt_shrt, &opt_ushrt, &opt_int, &opt_uint, &opt_long, &opt_ulong, &opt_llong, &opt_ullong, &opt_flt, &opt_dbl, &opt_ldbl, &opt_no_gcount, (void*)0 /* sentinel */); }