예제 #1
0
파일: test_iface.c 프로젝트: sbyx/hnetd
int main()
{
	sput_start_testing();
	sput_enter_suite("iface");
	sput_run_test(iface_test_new_unmanaged);
	sput_run_test(iface_test_new_managed);
	sput_leave_suite();
	sput_finish_testing();
	return sput_get_return_value();
}
예제 #2
0
int main(int argc, char **argv)
{
  openlog(argv[0], LOG_CONS | LOG_PERROR, LOG_DAEMON);
  sput_start_testing();
  sput_enter_suite("dns_util"); /* optional */
  sput_run_test(check_test_strings);
  sput_run_test(check_test_ipv6);
  sput_leave_suite(); /* optional */
  sput_finish_testing();
  return sput_get_return_value();
  return 0;
}
예제 #3
0
int main() {
	sput_start_testing();
	sput_enter_suite("Prince Test 1");
	sput_run_test(prince_test_1);
	sput_enter_suite("Prince Test 2");
	sput_run_test(prince_test_2);
	sput_enter_suite("Prince Test 3");
	sput_run_test(prince_test_3);
	sput_enter_suite("Prince Test 4");
	sput_run_test(prince_test_4);
	sput_finish_testing();
	return sput_get_return_value();
}
예제 #4
0
int main(__unused int argc, __unused char **argv)
{
  setbuf(stdout, NULL); /* so that it's in sync with stderr when redirected */
  openlog(argv[0], LOG_CONS | LOG_PERROR, LOG_DAEMON);
  sput_start_testing();
  sput_enter_suite(argv[0]); /* optional */
  sput_run_test(test_hncp_multicast);
  sput_run_test(test_hncp_multicast_noaddr);
  sput_leave_suite(); /* optional */
  sput_finish_testing();
  return sput_get_return_value();

}
예제 #5
0
파일: main.cpp 프로젝트: sopyer/mjson
int main()
{
    sput_start_testing();

    sput_enter_suite("mjson: Parsing tests");
    sput_run_test(mjson_valid_syntax_tests);
    sput_run_test(mjson_invalid_syntax_tests);

    sput_enter_suite("mjson: Data tests");
    sput_run_test(mjson_content_tests);

    sput_finish_testing();

    return sput_get_return_value();
}
void testingActionQueue()	{

    sput_start_testing();

    sput_set_output_stream(NULL);

    sput_enter_suite("testCheckMem(): memory check");
    sput_run_test(testCheckMem);
    sput_leave_suite();


    sput_enter_suite("testPushToQueue(): Pushing to queue");
    sput_run_test(testPushToQueue);
    sput_leave_suite();

    sput_finish_testing();
}
예제 #7
0
int run_bit_tests()
{
    sput_start_testing();

    sput_enter_suite("CORE bits: test bit_ffs32");
    sput_run_test(test_ffs32);
    sput_enter_suite("CORE bits: test bit_fls32");
    sput_run_test(test_fls32);
    sput_enter_suite("CORE bits: test bit_ffs64");
    sput_run_test(test_ffs64);
    sput_enter_suite("CORE bits: test bit_fls64");
    sput_run_test(test_fls64);

    sput_finish_testing();

    return sput_get_return_value();
}
예제 #8
0
파일: testIsEmpty.c 프로젝트: chlange/dynar
int main(void)
{
    sput_start_testing();

    sput_enter_suite("daIsEmpty should fail if any paramter is NULL");
    sput_run_test(testNull);

    sput_enter_suite("daIsEmpty should return the fill state of the array");
    sput_run_test(testValid);

    sput_enter_suite("daIsEmpty should fail if the magic number in the header mismatches the expected magic number");
    sput_run_test(testMagic);

    sput_finish_testing();

    return sput_get_return_value();
}
예제 #9
0
파일: test_dummy.c 프로젝트: dtaht/hnetd
int main(__unused int argc, __unused char **argv)
{
  openlog("test_dummy", LOG_CONS | LOG_PERROR, LOG_DAEMON);
  sput_start_testing();
  sput_enter_suite("dummysuite"); /* optional */
  sput_run_test(sample);
  sput_leave_suite(); /* optional */
  sput_finish_testing();
  return sput_get_return_value();
}
예제 #10
0
int TestCRC32()
{
    sput_start_testing();
    sput_enter_suite("Test crc32...");

    sput_run_test(Test_CRC);

    sput_finish_testing();
    return sput_get_return_value();
}
예제 #11
0
파일: testClear.c 프로젝트: chlange/dynar
int main(void)
{
    sput_start_testing();

    sput_enter_suite("daClear should fail if any paramter is NULL");
    sput_run_test(testNull);

    sput_enter_suite("daClear should succeed if everything is okay");
    sput_run_test(testValid);

    sput_enter_suite("daClear should fail if we pass an unknown mode");
    sput_run_test(testUnknownMode);

    sput_enter_suite("daClear should fail if the magic number in the header mismatches the expected magic number");
    sput_run_test(testMagic);

    sput_finish_testing();

    return sput_get_return_value();
}
예제 #12
0
파일: yadp.c 프로젝트: theNerd247/yadp
int main(int argc, char const *argv[])
{
	//run unit tests
	#ifdef UNITTST

	sput_start_testing();
	sput_enter_suite("getrecurtm(): RECUR parsing");
	sput_run_test(test_getrecur);

	sput_enter_suite("gettm() parsing");
	sput_run_test(test_gettm_success);
	sput_run_test(test_gettm_fail);

	sput_finish_testing();
	#endif

	test_getformat_success();

 	return EXIT_SUCCESS;
}
예제 #13
0
void testLevelController()	{

    sput_start_testing();
    sput_set_output_stream(NULL);

    sput_enter_suite("testReadLevelSettingsFile(): Testing reading and processing level keywords");
    sput_run_test(testReadLevelSettingsFile);
    sput_leave_suite();


    sput_finish_testing();
}
예제 #14
0
void testEnemy()
{
    SCREEN_WIDTH_GLOBAL = 1000;
    SCREEN_HEIGHT_GLOBAL = 1000;
    sput_start_testing();
    sput_set_output_stream(NULL);
    
    sput_enter_suite("Test_createEnemy(): Creating valid enemies in enemy group");
    sput_run_test(Test_createEnemy);
    sput_leave_suite();
    
    sput_enter_suite("testInitialiseEnemy(): Creating valid initialised enemies");
    sput_run_test(testInitialiseEnemy);
    sput_leave_suite();
    
    sput_enter_suite("testEnemyMovement(): Moving an enemy");
    sput_run_test(testEnemyMovement);
    sput_leave_suite();
    
    sput_finish_testing();
}
예제 #15
0
void testingGameStructure()	{
	sput_start_testing();
	
	sput_set_output_stream(NULL);

	sput_enter_suite("testlastAction(): Cooldown checking");
	sput_run_test(testlastAction);
	sput_leave_suite();
	
	sput_enter_suite("testSetLastAction(): Setting last action to current clock");
	sput_run_test(testSetLastAction);
	sput_leave_suite();

	sput_enter_suite("CreateGameTest(): Creation & Initialization");
	sput_run_test(CreateGameTest);
	sput_leave_suite();

	sput_enter_suite("TestGetAvailableMemory(): Current Memory Available");
	sput_run_test(TestGetAvailableMemory);
	sput_leave_suite();

	sput_enter_suite("TestAddMemory(): Adding Memory");
	sput_run_test(TestAddMemory);
	sput_leave_suite();

	sput_enter_suite("TestUseMemory(): Using More Memory");
	sput_run_test(TestUseMemory);
	sput_leave_suite();

	sput_finish_testing();
}
void testingGameStructure()	{
    sput_start_testing();

    sput_set_output_stream(NULL);

    sput_enter_suite("testStartNextWave(): Testing wave management");
    sput_run_test(testStartNextWave);
    sput_leave_suite();

    sput_enter_suite("testClocks(): Testing Clock Data Structure");
    sput_run_test(testClocks);
    sput_leave_suite();

    sput_enter_suite("CreateGameTest(): Creation & Initialization");
    sput_run_test(CreateGameTest);
    sput_leave_suite();

    sput_enter_suite("TestGetAvailableMemory(): Current Memory Available");
    sput_run_test(TestGetAvailableMemory);
    sput_leave_suite();

    sput_enter_suite("TestAddMemory(): Adding Memory");
    sput_run_test(TestAddMemory);
    sput_leave_suite();

    sput_enter_suite("TestUseMemory(): Using More Memory");
    sput_run_test(TestUseMemory);
    sput_leave_suite();

    sput_finish_testing();
}
예제 #17
0
파일: main.c 프로젝트: TristanDuck/C
int main(void)
{
    sput_start_testing();

    sput_enter_suite("Exercise 1: max()");
    sput_run_test(test_max);

    sput_enter_suite("Exercise 2: min()");
    sput_run_test(test_min);

    sput_enter_suite("Exercise 3: normalize()");
    sput_run_test(test_normalize);

    sput_enter_suite("Exercise 4: avg_magnitude()");
    sput_run_test(test_avg_magnitude);

    sput_enter_suite("Exercise 5: avg_power()");
    sput_run_test(test_avg_power);

    sput_finish_testing();
    return sput_get_return_value();
}
예제 #18
0
파일: main.c 프로젝트: dustan1/Things
int main(void)
{
    sput_start_testing();

    test_print_fraction();

    sput_enter_suite("Exercise 2: gcd()");
    sput_run_test(test_gcd);

    sput_enter_suite("Exercise 3: reduce()");
    sput_run_test(test_reduce);

    sput_enter_suite("Exercise 4: make_fraction()");
    sput_run_test(test_make_fraction);

    sput_enter_suite("Exercise 5: add_fractions()");
    sput_run_test(test_add_fractions);

    sput_enter_suite("Exercise 6: multiply_fractions()");
    sput_run_test(test_multiply_fractions); 

    sput_finish_testing();
    return sput_get_return_value();
}
예제 #19
0
int main(int argc, const char * argv[])
{
    sput_start_testing();
    
    sput_enter_suite("snFrameHeader tests");
    sput_run_test(testFrameHeaderSerialization);
    sput_run_test(testFrameHeaderValidation);
    sput_run_test(testMasking);
    
    sput_enter_suite("snFrameParser tests");
    sput_run_test(testFrameParserHeaderEquality);
    
    sput_enter_suite("snOpeningHandshakeParser tests");
    sput_run_test(testWellFormedResponse);
    sput_run_test(testWrongHTTPStatus);
    sput_run_test(testMissingWebsocketKey);
    sput_run_test(testHeaderFollowedByFrames);
    
    sput_enter_suite("snWebsocket state tests");
    sput_run_test(testConnectionState);
    
    sput_finish_testing();
}
예제 #20
0
파일: main.c 프로젝트: jacquesrott/icecore
int main(int argc, char** argv){
	sput_start_testing();

	sput_enter_suite("cursor");
	sput_run_test(test_cursor);

	sput_enter_suite("btree");
	sput_run_test(test_btree);
    sput_run_test(test_btree_cursor);

	sput_enter_suite("filestore");
	sput_run_test(test_filestore);

	sput_enter_suite("array");
	sput_run_test(test_array);
	sput_run_test(test_big_array);

    sput_enter_suite("mtree");
    sput_run_test(test_mtree);
	
	sput_finish_testing();
	return sput_get_return_value();
}
예제 #21
0
파일: unittests.c 프로젝트: ifzz/skicka
int main(int argc, const char * argv[])
{
    sput_start_testing();
    
    sput_enter_suite("Mutable string tests");
    sput_run_test(testMutableStringSingleAppend);
    sput_run_test(testMutableStringMutipleAppend);
    sput_leave_suite();
    
    sput_enter_suite("Synchronous request tests");
    sput_run_test(testSuccessfulGET);
    sput_run_test(testSuccessfulGETResend);
    sput_run_test(testFailedGET);
    sput_leave_suite();
    
    sput_enter_suite("Asynchronous request tests");
    sput_run_test(testSuccessfulGETAsync);
    sput_run_test(testCancelledGETAsync);
    sput_run_test(testFailedGETAsync);
    sput_leave_suite();
    
    sput_enter_suite("REST Client tests");
    sput_run_test(testClientRequestCount);
    sput_run_test(testClientRequestPoolSize);
    sput_run_test(testClientResendRequestFromCallback);
    sput_leave_suite();
    
    sput_finish_testing();
    
    return 0;
}
예제 #22
0
 int run_secure_session_test(){
   sput_enter_suite("ThemisPP secure session test");
   sput_run_test(secure_session_test, "secure_session_test", __FILE__);
   return 0;
 }
예제 #23
0
파일: main.c 프로젝트: dustan1/Things
int main(void)
{
    sput_start_testing();

    sput_enter_suite("Lab 7, Exercise 1: intlist_construct()");
    sput_run_test(test_intlist_construct);

    test_intlist_print();

    sput_enter_suite("Lab 7, Exercise 3: intlist_append()");
    sput_run_test(test_intlist_append);

    sput_enter_suite("Lab 7, Exercise 4: intlist_capacity()");
    sput_run_test(test_intlist_capacity);

    sput_enter_suite("Lab 7, Exercise 5: intlist_size()");
    sput_run_test(test_intlist_size);

    sput_enter_suite("Lab 7, Exercise 6: intlist_get()");
    sput_run_test(test_intlist_get);

    sput_enter_suite("Lab 7, Exercise 7: intlist_set()");
    sput_run_test(test_intlist_set);

    sput_enter_suite("Lab 7, Exercise 8: intlist_removeall()");
    sput_run_test(test_intlist_removeall);

    sput_enter_suite("Lab 8, Exercise 1: intlist_index()");
    sput_run_test(test_intlist_index);

    sput_enter_suite("Lab 8, Exercise 2: intlist_count()");
    sput_run_test(test_intlist_count);

    sput_enter_suite("Lab 8, Exercise 3: intlist_contains()");
    sput_run_test(test_intlist_contains);

    sput_enter_suite("Lab 8, Exercise 4: increase_capacity()");
    sput_run_test(test_increase_capacity);

    sput_enter_suite("Lab 8, Exercise 5: modified intlist_append()");
    sput_run_test(test_modified_intlist_append);

    sput_enter_suite("Lab 8, Exercise 6: intlist_delete()");
    sput_run_test(test_intlist_delete);

    sput_finish_testing();
    return sput_get_return_value();
}
예제 #24
0
 int run_secure_comparator_test(){
   sput_enter_suite("ThemisPP secure comparator test");
   sput_run_test(secure_comparator_test, "secure_comparator_test", __FILE__);
   return 0;
 }