mirror of https://github.com/aria2/aria2
2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.pull/1/head
parent
0d130b77f4
commit
4b67290f00
|
@ -1,3 +1,7 @@
|
|||
2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
* test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
|
||||
|
||||
2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Make room for future enchancements for IPv6 addresses.
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
#include <cppunit/CompilerOutputter.h>
|
||||
#include <cppunit/extensions/TestFactoryRegistry.h>
|
||||
#include <cppunit/ui/text/TestRunner.h>
|
||||
#ifdef HAVE_LIBSSL
|
||||
# include <openssl/err.h>
|
||||
# include <openssl/ssl.h>
|
||||
#endif // HAVE_LIBSSL
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
# include <gnutls/gnutls.h>
|
||||
#endif // HAVE_LIBGNUTLS
|
||||
|
||||
using aria2::SharedHandle;
|
||||
using aria2::SingletonHolder;
|
||||
|
@ -14,11 +21,25 @@ int main(int argc, char* argv[]) {
|
|||
runner.setOutputter(new CppUnit::CompilerOutputter(&runner.result(), std::cerr));
|
||||
|
||||
// setup
|
||||
|
||||
#ifdef HAVE_LIBSSL
|
||||
// for SSL initialization
|
||||
SSL_load_error_strings();
|
||||
SSL_library_init();
|
||||
#endif // HAVE_LIBSSL
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
gnutls_global_init();
|
||||
#endif // HAVE_LIBGNUTLS
|
||||
|
||||
SharedHandle<aria2::CookieBoxFactory> cookieBoxFactory = new aria2::CookieBoxFactory();
|
||||
SingletonHolder<SharedHandle<aria2::CookieBoxFactory> >::instance(cookieBoxFactory);
|
||||
|
||||
// Run the tests.
|
||||
bool successfull = runner.run();
|
||||
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
gnutls_global_deinit();
|
||||
#endif // HAVE_LIBGNUTLS
|
||||
|
||||
return successfull ? 0 : 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue