void test() { test_1(); test_2(); test_3(); test_4(); test_5(); test_6(); test_7(); test_8(); test_9(); test_10(); test_11(); test_12(); }
int main () { #ifdef _DEBUG Profiler::set_total("ArrayHandler", 24); test_1 (); test_2 (); test_3 (); test_4 (); test_5 (); test_6 (); test_7 (); test_8 (); test_9 (); test_10 (); test_11 (); test_12 (); test_13 (); test_14 (); test_15 (); test_16 (); cout << "\n\nTesting iterators:\n\n"; Profiler::set_total("ArrayIterator", 17); test_17 (); test_18 (); test_19 (); test_20 (); //Profiler::report(); Profiler::report_to_file(); cout << "------------------------------------------------------------\n\n"; cout << " CHECK Profiler data in Profiler_report.txt\n\n"; cout << " To show all debug info - comment line 12 in ArrayIterator.h\n\n"; cout << "------------------------------------------------------------\n\n"; #else cout << "Testing requires DEBUG mode.\n\n"; #endif return EXIT_SUCCESS; }
int main() { int i, j, k; int errors=0; int success=0; for (i=-2,j=10; i<20; i++, j--) if (test_12(&i,&j)!=test_function(&i,&j)) errors++; else success++; printf("success,%d\nerrors,%d\ntotal,%d\n",success,errors,success+errors); return 0; }
int main() { printf("1) %d \n", test_1()); printf("2) %d \n", test_2()); test_3(); printf("\n4) %d \n", test_4()); printf("5) %d \n", test_5()); printf("6) %d \n", test_6()); printf("7) %d \n", test_7()); test_8(); test_9(); test_10(); printf("\n11) string \`%c\` \n", test_11()); printf("\n12) %d", test_12()); test_13(); test_14(); test_15(); test_16(); test_17(); test_18(); test_19(); }
/* The main testfunction. Returns 0 if any error is found in the cfg */ int kfg_testit (KFG kfg, int quiet_mode) { cfg = kfg; quiet = (quiet_mode == 1); error_found = 0; diagnostic ("Consistency test of cfg and PAG-interface "); /* do the tests */ if (0 != kfg_num_nodes (cfg)) { if (error_found < 100) test_1 (); if (error_found < 100) test_2 (); if (error_found < 100) test_3 (); if (error_found < 100) test_4 (); if (error_found < 100) test_5 (); if (error_found < 100) test_6 (); if (error_found < 100) test_7 (); if (error_found < 100) test_8 (); if (error_found < 100) test_9 (); if (error_found < 100) test_10 (); if (error_found < 100) test_11 (); if (error_found < 100) test_12 (); if (error_found < 100) test_13 (); } /* tests for empty cfg's */ else test_0 (); if (error_found == 0) diagnostic (" excellent!\n"); else diagnostic (" ** errors found **\n"); return (error_found == 0); }
int main(void) { uint32_t result = TC_PASS; TC_START("Performing SHA256 tests (NIST tests vectors):"); result = test_1(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #1 failed.\n"); goto exitTest; } result = test_2(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #2 failed.\n"); goto exitTest; } result = test_3(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #3 failed.\n"); goto exitTest; } result = test_4(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #4 failed.\n"); goto exitTest; } result = test_5(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #5 failed.\n"); goto exitTest; } result = test_6(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #6 failed.\n"); goto exitTest; } result = test_7(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #7 failed.\n"); goto exitTest; } result = test_8(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #8 failed.\n"); goto exitTest; } result = test_9(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #9 failed.\n"); goto exitTest; } result = test_10(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #10 failed.\n"); goto exitTest; } result = test_11(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #11 failed.\n"); goto exitTest; } result = test_12(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #12 failed.\n"); goto exitTest; } result = test_13(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #13 failed.\n"); goto exitTest; } result = test_14(); if (result == TC_FAIL) { /* terminate test */ TC_ERROR("SHA256 test #14 failed.\n"); goto exitTest; } TC_PRINT("All SHA256 tests succeeded!\n"); exitTest: TC_END_RESULT(result); TC_END_REPORT(result); }
bool test_all() { /* return test_3_4() && test_3_3() && test_12() && test_11() && test_4_4() && test_4_5() && test_3_5(); */ return test_3_3() && test_12() && test_4_4() && test_3_5(); }