Beispiel #1
0
int main(int argc, char *argv[])
{
	base64_test("");
	base64_test("a");
	base64_test("Something that doesn't fit into a single line, "
	            "something that doesn't fit into a single line, "
	            "something that doesn't fit into a single line, "
	            "something that doesn't fit into a single line, "
	            "something that doesn't fit into a single line. ");
	base64_test("\001\002\003\004\005\006\253\254\255");
}
Beispiel #2
0
int main(int argc, char ** argv)
{
    lt_type_init();

    array_test();
    
    hash_test();

    module_test();

    base64_test();

    set_test();

    object_test();

    return 0;
}
Beispiel #3
0
int misc_test(void)
{
#ifdef LTC_HKDF
   DO(hkdf_test());
#endif
#ifdef LTC_PKCS_5
   DO(pkcs_5_test());
#endif
#ifdef LTC_BASE64
   DO(base64_test());
#endif
#ifdef LTC_ADLER32
   DO(adler32_test());
#endif
#ifdef LTC_CRC32
   DO(crc32_test());
#endif
   return 0;
}
Beispiel #4
0
int main(int argc, char *argv[])
{
	plan(28);
	header();

	const char *option_tests[] = {
		"", "a", "123", "1234567", "12345678",
		"\001\002\003\004\005\006\253\254\255",
		"Test +/+/+/ test test test test test test test test test "\
		"test test test test test test test test test test test test "\
		"test test test test test test test test test test test test "\
		"test test test test test test test test test test\n\n"
	};
	for (size_t i = 0; i < lengthof(option_tests); ++i) {
		base64_test(option_tests[i], 0, NULL, 0);
		base64_urlsafe_test(option_tests[i]);
		base64_nopad_test(option_tests[i]);
		base64_nowrap_test(option_tests[i]);
	}

	footer();
	return check_plan();
}
Beispiel #5
0
int _tmain()
{
	base64_test();
	system("pause");
	return 0;
}
Beispiel #6
0
int main()
{
	printf("Base64 tests: %s\n", base64_test() ? "PASSED" : "FAILED");

	return 0;
}
Beispiel #7
0
static void
base64_nowrap_test(const char *str)
{
	const char symbols[] = { '\n' };
	base64_test(str, BASE64_NOWRAP, symbols, lengthof(symbols));
}
Beispiel #8
0
static void
base64_nopad_test(const char *str)
{
	const char symbols[] = { '=' };
	base64_test(str, BASE64_NOPAD, symbols, lengthof(symbols));
}
Beispiel #9
0
static void
base64_urlsafe_test(const char *str)
{
	const char symbols[] = { '\n', '+', '=' };
	base64_test(str, BASE64_URLSAFE, symbols, lengthof(symbols));
}
Beispiel #10
0
int main(int argc, char* argv[])
{
#if defined(OS_LINUX)
	struct sigaction sa;
	sa.sa_handler = SIG_IGN;
	sigaction(SIGCHLD, &sa, 0);
	sigaction(SIGPIPE, &sa, 0);
#endif

	heap_test();
	rbtree_test();
	timer_test();

	socket_test();
	locker_test();
	atomic_test();
#if defined(ATOMIC_TEST)
	atomic_test2();
#endif
	spinlock_test();
	event_test();
#if !defined(OS_MAC)
	semaphore_test();
#endif
	onetime_test();

	bits_test();
	stack_test();
	time64_test();
	base64_test();
	bitmap_test();
	hweight_test();
	ring_buffer_test();

	uri_parse_test();

#if defined(HTTP_TEST)
	http_test();
#endif

	thread_pool_test();
	task_queue_test();

	ip_route_test();

    aio_socket_test_cancel();
    aio_socket_test();
    aio_socket_test2();
    aio_socket_test3();
    aio_socket_test4();

#if defined(OS_WINDOWS)
	unicode_test();
	utf8codec_test();
	systimer_test();

	system("pause");
#endif

    return 0;
}