int main(void) { static void (*test_functions[])(void) = { test_dsync_proxy_box_list, test_dsync_proxy_subs_list, test_dsync_proxy_msg_list, test_dsync_proxy_box_create, test_dsync_proxy_box_delete, test_dsync_proxy_box_rename, test_dsync_proxy_box_update, test_dsync_proxy_box_select, test_dsync_proxy_msg_update, test_dsync_proxy_msg_uid_change, test_dsync_proxy_msg_expunge, test_dsync_proxy_msg_copy, test_dsync_proxy_msg_save, NULL }; test_init(); out = buffer_create_dynamic(default_pool, 1024); server = dsync_proxy_server_init_test(out); test_worker = (struct test_dsync_worker *)server->worker; test_run_funcs(test_functions); return test_deinit(); }
int main (int argc, char **argv) { int result; test_init (argc, argv); g_test_add_func ("/live-search", test_live_search); result = g_test_run (); test_deinit (); return result; }
int main (int argc, char **argv) { int result; test_init (argc, argv); g_test_add_func ("/parsers", test_parsers); result = g_test_run (); test_deinit (); return result; }
int main( int argc, char *argv[] ) { test_handle_args( argc, argv ); test_init(); TestFile files[] = { /* These are all the same data, but they're encoded with different amounts of lossage, so the * values are all similar but, unlike the header tests below, not identical. */ /* { "test PCM 44100 stereo.wav", 0, {0xfb6b,0x0076,0xf82b,0x0028}, {0xf598,0xf630,0xf2bd,0xf11d} }, { "test ADPCM 44100 stereo.wav",0, {0xfb6b,0x0076,0xf82b,0x0028}, {0xf6d7,0xf54f,0xf300,0xf19e} }, { "test ADPCM 22050 mono.wav", 1, {0xfc2a,0xfc2a,0xf4a8,0xf4a8}, {0xf329,0xf329,0xf1c2,0xf1c2} }, { "test OGG 44100 stereo.ogg", 0, {0xfb90,0x00b6,0xf84c,0x00ec}, {0xf794,0xf6c4,0xf34e,0xf2cd} }, { "test MP3 first frame corrupt.mp3", 2343, {0x0001,0x0000,0x0001,0x0000}, {0xe12f,0xfe36,0xf337,0x0778} }, { "test BASS first frame corrupt.wav", 2343, {0x0001,0x0000,0x0001,0x0000}, {0xe12f,0xfe36,0xf337,0x0778} }, */ /* "BASS" is the results of decoding each MP3 with BASS's "writewav" program. */ /* The following all contain the same data; they simply have different tags and headers. */ { "test MP3 44100 stereo CBR.mp3", 592, {0x0000,0x0001,0x0000,0x0001}, {0xef22,0x0cd6,0xee84,0x0bb6} }, { "test MP3 44100 stereo CBR (ID3V1).mp3", 592, {0x0000,0x0001,0x0000,0x0001}, {0xef22,0x0cd6,0xee84,0x0bb6} }, { "test MP3 44100 stereo CBR (ID3V2).mp3", 592, {0x0000,0x0001,0x0000,0x0001}, {0xef22,0x0cd6,0xee84,0x0bb6} }, { "test MP3 44100 stereo CBR (INFO, LAME).mp3", 1744, {0x0000,0x0001,0x0000,0x0001}, {0xfc71,0x23ee,0xfb74,0x2141} }, { "test BASS 44100 stereo CBR.wav", 592, {0x0000,0x0001,0x0000,0x0001}, {0xef22,0x0cd6,0xee84,0x0bb6} }, { "test BASS 44100 stereo CBR (ID3V1).wav", 592, {0x0000,0x0001,0x0000,0x0001}, {0xef22,0x0cd6,0xee84,0x0bb6} }, { "test BASS 44100 stereo CBR (ID3V2).wav", 592, {0x0000,0x0001,0x0000,0x0001}, {0xef22,0x0cd6,0xee84,0x0bb6} }, { "test BASS 44100 stereo CBR (INFO, LAME).wav", 1744, {0x0000,0x0001,0x0000,0x0001}, {0xfc71,0x23ee,0xfb74,0x2141} }, /* The following all contain the same data; they simply have different tags and headers. */ { "test MP3 44100 stereo VBR (INFO, LAME).mp3", 1774, {0xffff,0x0000,0xffff,0x0000}, {0xfe43,0x262a,0xfd0c,0x22bc} }, { "test MP3 44100 stereo VBR (XING, LAME).mp3", 622, {0xffff,0x0000,0xffff,0x0000}, {0xef6c,0x0cb8,0xef10,0x0bd2} }, { "test MP3 44100 stereo VBR (XING, LAME, ID3V1, ID3V2).mp3", 622, {0xffff,0x0000,0xffff,0x0000}, {0xef6c,0x0cb8,0xef10,0x0bd2} }, { "test BASS 44100 stereo VBR (INFO, LAME).wav", 1774, {0xffff,0x0000,0xffff,0x0000}, {0xfe43,0x262a,0xfd0c,0x22bc} }, { "test BASS 44100 stereo VBR (XING, LAME).wav", 622, {0xffff,0x0000,0xffff,0x0000}, {0xef6c,0x0cb8,0xef10,0x0bd2} }, { "test BASS 44100 stereo VBR (XING, LAME, ID3V1, ID3V2).wav", 622, {0xffff,0x0000,0xffff,0x0000}, {0xef6c,0x0cb8,0xef10,0x0bd2} }, { NULL, 0, {0,0,0,0}, {0,0,0,0} } }; for( int i = 0; files[i].fn; ++i ) { if( !test_file( files[i], 0 ) ) LOG->Trace(" "); } test_deinit(); exit(0); }
int main (int argc, char **argv) { int result; test_init (argc, argv); g_test_add_func ("/irc-server/new", test_empathy_irc_server_new); g_test_add_func ("/irc-server/property-change", test_property_change); g_test_add_func ("/irc-server/modified-signal", test_modified_signal); result = g_test_run (); test_deinit (); return result; }
int main( int argc, char *argv[] ) { test_handle_args( argc, argv ); test_init(); /* Setup. */ FILEMAN->Mount( "TEST", ".", "/test" ); SanityCheck(); IniTest(); MsdTest(); CryptoTest(); test_deinit(); exit(0); }
int test_run(void (*test_functions[])(void)) { test_init(); test_run_funcs(test_functions); return test_deinit(); }
int main (int argc, char **argv) { int result; guint i; test_t tests[] = { SUCCESS("/xmpp-sasl/normal-auth", NULL, TRUE), SUCCESS("/xmpp-sasl/no-plain", NULL, FALSE), SUCCESS("/xmpp-sasl/only-plain", "PLAIN", TRUE), SUCCESS("/xmpp-sasl/only-digest-md5", "DIGEST-MD5", TRUE), { "/xmpp-sasl/digest-md5-final-data-in-success", "DIGEST-MD5", TRUE, 0, 0, SERVER_PROBLEM_FINAL_DATA_IN_SUCCESS, FALSE, FALSE, "test", "test123", NULL }, FAIL("/xmpp-sasl/no-supported-mechs", "NONSENSE", TRUE, WOCKY_AUTH_ERROR, WOCKY_AUTH_ERROR_NO_SUPPORTED_MECHANISMS, SERVER_PROBLEM_NO_PROBLEM), FAIL("/xmpp-sasl/refuse-plain-only", "PLAIN", FALSE, WOCKY_AUTH_ERROR, WOCKY_AUTH_ERROR_NO_SUPPORTED_MECHANISMS, SERVER_PROBLEM_NO_PROBLEM), FAIL("/xmpp-sasl/no-sasl-support", NULL, TRUE, WOCKY_AUTH_ERROR, WOCKY_AUTH_ERROR_NOT_SUPPORTED, SERVER_PROBLEM_NO_SASL), { "/xmpp-sasl/wrong-username-plain", "PLAIN", TRUE, WOCKY_AUTH_ERROR, WOCKY_AUTH_ERROR_FAILURE, SERVER_PROBLEM_INVALID_USERNAME, TRUE, FALSE, "test", "test123" }, { "/xmpp-sasl/wrong-username-md5", "DIGEST-MD5", TRUE, WOCKY_AUTH_ERROR, WOCKY_AUTH_ERROR_FAILURE, SERVER_PROBLEM_INVALID_USERNAME, TRUE, FALSE, "test", "test123" }, { "/xmpp-sasl/wrong-password-plain", "PLAIN", TRUE, WOCKY_AUTH_ERROR, WOCKY_AUTH_ERROR_FAILURE, SERVER_PROBLEM_INVALID_PASSWORD, FALSE, TRUE, "test", "test123" }, { "/xmpp-sasl/wrong-password-md5", "DIGEST-MD5", TRUE, WOCKY_AUTH_ERROR, WOCKY_AUTH_ERROR_FAILURE, SERVER_PROBLEM_INVALID_PASSWORD, FALSE, TRUE, "test", "test123" }, /* Redo the MD5-DIGEST test with a username, password and realm that * happens to generate a \0 byte in the md5 hash of * 'username:realm:password'. This used to trigger a bug in the sasl helper * when calculating the A! part of the response MD5-DIGEST hash */ { "/xmpp-sasl/digest-md5-A1-null-byte", "DIGEST-MD5", TRUE, 0, 0, SERVER_PROBLEM_NO_PROBLEM, FALSE, FALSE, "moose", "something", "cass-x200s" }, /* Redo the MD5-DIGEST test with extra whitespace in the challenge */ { "/xmpp-sasl/digest-md5-spaced-challenge", "DIGEST-MD5", FALSE, 0, 0, SERVER_PROBLEM_SPACE_CHALLENGE, FALSE, FALSE, "moose", "something", "cass-x200s" }, /* Redo the MD5-DIGEST test with extra \ escapes in the challenge */ { "/xmpp-sasl/digest-md5-slash-challenge", "DIGEST-MD5", FALSE, 0, 0, SERVER_PROBLEM_SLASH_CHALLENGE, FALSE, FALSE, "moose", "something", "cass-x200s" }, { "/xmpp-sasl/external-handler-fail", "X-TEST", FALSE, WOCKY_AUTH_ERROR, WOCKY_AUTH_ERROR_FAILURE, SERVER_PROBLEM_INVALID_PASSWORD, FALSE, FALSE, "dave", "daisy daisy", "hal" }, { "/xmpp-sasl/external-handler-succeed", "X-TEST", FALSE, 0, 0, SERVER_PROBLEM_NO_PROBLEM, FALSE, FALSE, "ripley", "open sesame", "mother" }, }; test_init (argc, argv); mainloop = g_main_loop_new (NULL, FALSE); for (i = 0; i < G_N_ELEMENTS (tests); i++) g_test_add_data_func (tests[i].description, &tests[i], run_test); result = g_test_run (); test_deinit (); return result; }