1//
2// Driver.cpp
3//
4// Console-based test driver for Poco Crypto.
5//
6// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
7// and Contributors.
8//
9// SPDX-License-Identifier: BSL-1.0
10//
11
12
13#include "Poco/CppUnit/TestRunner.h"
14#include "CryptoTestSuite.h"
15#include "Poco/Crypto/Crypto.h"
16
17
18class CryptoInitializer
19{
20public:
21 CryptoInitializer()
22 {
23 Poco::Crypto::initializeCrypto();
24 }
25
26 ~CryptoInitializer()
27 {
28 Poco::Crypto::uninitializeCrypto();
29 }
30};
31
32
33int main(int ac, char **av)
34{
35 CryptoInitializer ci;
36
37 std::vector<std::string> args;
38 for (int i = 0; i < ac; ++i)
39 args.push_back(std::string(av[i]));
40 CppUnit::TestRunner runner;
41 runner.addTest("CryptoTestSuite", CryptoTestSuite::suite());
42 return runner.run(args) ? 0 : 1;
43}
44