コード例 #1
0
ファイル: main.c プロジェクト: netskink/quicksort
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);

}
コード例 #2
0
ファイル: make_heap.cpp プロジェクト: CornedBee/range-v3
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);
}
コード例 #3
0
ファイル: test-oblig3.c プロジェクト: syhd/INF2270-UiO-2016
/* 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;
}
コード例 #4
0
ファイル: bb_test.c プロジェクト: aeternocap/ecos
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;
}
コード例 #5
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();
}
コード例 #6
0
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;
}
コード例 #7
0
ファイル: pop_heap.cpp プロジェクト: QiTai/range-v3
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();
}
コード例 #8
0
ファイル: test_hmac.c プロジェクト: Ajoyacr/tinycrypt
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;
}
コード例 #9
0
ファイル: main.cpp プロジェクト: mmvlad/ArrayHandler
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;
}
コード例 #10
0
ファイル: Source.cpp プロジェクト: novikkk/cplusplus
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();
}
コード例 #11
0
ファイル: testcfg.c プロジェクト: 8l/rose
/* 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);
}
コード例 #12
0
ファイル: test_sha256.c プロジェクト: thurday/tinycrypt
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);
}