int main(int argc, char *argv[]) { int iRC; iRC=EXIT_SUCCESS; if (argc != 1) { fprintf(stderr, "Usage: %s\n", argv[0]); iRC=EXIT_FAILURE; exit(iRC); } if (test_1())exit(1); if (test_2())exit(1); if (test_3())exit(1); if (test_4())exit(1); if (test_5())exit(1); if (test_6())exit(1); if (test_7())exit(1); if (test_8())exit(1); if (test_9())exit(1); if (test_10())exit(1); exit(iRC); }
void test(int N) { test_1(N); test_2(N); test_3(N); test_4(N); test_5(N); test_6(N); test_7(N); test_8(N); }
static void setUp_test_5(void) { if (domain == NULL) { domain = kzalloc(sizeof(DomainDesc), GFP_KERNEL); domain->codeBorder = kzalloc((sizeof(char *) * getJVMConfig(codeFragments)), GFP_KERNEL); domain->code = kzalloc((sizeof(char *) * getJVMConfig(codeFragments)), GFP_KERNEL); domain->codeTop = kzalloc((sizeof(char *) * getJVMConfig(codeFragments)), GFP_KERNEL); domain->cur_code = -1; domain->code_bytes = getJVMConfig(codeBytes); } test_6(); }
static void test_sllist(void) { test_1(); test_2(); test_3(); test_4(); test_5(); test_6(); test_8(); test_9(); test_10(); test_11(); }
/* Main program */ int main (void) { printf("Test 1 (write a byte): "); test_1(); printf("Test 2 (write 1-byte utf-8): "); test_2(); printf("Test 3 (write 2-byte utf-8): "); test_3(); printf("Test 4 (write 3+4-byte utf-8): "); test_4(); printf("Test 5 (read a byte): "); test_5(); printf("Test 6 (read 1-byte utf-8): "); test_6(); printf("Test 7 (read 2-byte utf-8): "); test_7(); printf("Test 8 (read 3+4-byte utf-8): "); test_8(); return 0; }
int main(){ printf("Pass: 1, Fail: 0\n=============\n"); printf("\n\nTest 1aBoolean: %u\n=============\n", test_1a_bool()); printf("\n\nTest 1aInteger: %u\n=============\n", test_1a_int()); printf("\n\nTest 1b: %u\n=============\n", test_1b()); printf("\n\nTest 2: %u\n=============\n", test_2()); printf("\n\nTest 3: %u\n=============\n", test_3()); printf("\n\nTest 4: %u\n=============\n", test_4()); printf("\n\nTest 5: %u\n=============\n", test_5()); printf("\n\nTest 6: %u\n=============\n", test_6()); printf("\n\nTest 7: %u\n=============\n", test_7()); return 0; }
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(){ fixtureSetup(); resetTestCount(); testStarted("test_1"); setup(); test_1(); tearDown(); testEnded(); testStarted("test_2"); setup(); test_2(); tearDown(); testEnded(); testStarted("test_3"); setup(); test_3(); tearDown(); testEnded(); testStarted("test_4"); setup(); test_4(); tearDown(); testEnded(); testStarted("test_5"); setup(); test_5(); tearDown(); testEnded(); testStarted("test_6"); setup(); test_6(); tearDown(); testEnded(); testStarted("test_7"); setup(); test_7(); tearDown(); testEnded(); testStarted("test_8"); setup(); test_8(); tearDown(); testEnded(); summarizeTestCount(); fixtureTearDown(); return 0; }
int main() { test_1(1000); test_2(1000); test_3(1000); test_4(1000); test_5(1000); test_6(1000); test_7(1000); test_8(1000); test_9(1000); test_10(1000); return test_result(); }
int32_t main (void) { setbuf(stdout, NULL); printf ("Performing HMAC tests (RFC4231 test vectors)...\n"); test_1 (); test_2 (); test_3 (); test_4 (); test_5 (); test_6 (); test_7 (); printf ("All HMAC tests succeeded!\n\n"); return 0; }
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() { 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(); }
int main(int argc, char**argv) { if (argc<2) { printf("Syntax:"); printf(" %s <test-number> <test-number> <test-number> . . .\r\n", argv[0]); return -1; } if (mallopt(M_CHECK_ACTION, 7) != 1) { fprintf(stderr, "mallopt() failed"); return(-1); } int ctr; for( ctr=1; ctr < argc; ctr++ ) { int test_number = atoi(argv[ctr]); switch (test_number) { case 1: unintialized_use(); break; case 2: rw_after_free(); break; case 3: rw_malloc_overrun(); break; case 4: rw_bad_stk_location(); break; case 5: mem_leak(); break; case 6: test_6(); break; case 7: memcpy_overlapping_src_dst(); break; case 8: double_free(); break; case 9: systemcall_unaddressable_bytes(); break; case 10: stk_overrun(); break; case 11: glob_buff_overrun(); break; default: printf("No test or invalid test specified (only 1--9 are valid)."); return -1; } } return 0; }
/* 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); }