mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-03 15:47:13 +01:00
49 lines
874 B
C++
49 lines
874 B
C++
//
|
|
// WinCEDriver.cpp
|
|
//
|
|
// Console-based test driver for Windows CE.
|
|
//
|
|
// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#include "Poco/CppUnit/TestRunner.h"
|
|
#include "CryptoTestSuite.h"
|
|
#include "Poco/Crypto/Crypto.h"
|
|
#include <cstdlib>
|
|
|
|
|
|
class CryptoInitializer
|
|
{
|
|
public:
|
|
CryptoInitializer()
|
|
{
|
|
Poco::Crypto::initializeCrypto();
|
|
}
|
|
|
|
~CryptoInitializer()
|
|
{
|
|
Poco::Crypto::uninitializeCrypto();
|
|
}
|
|
};
|
|
|
|
|
|
int _tmain(int argc, wchar_t* argv[])
|
|
{
|
|
CryptoInitializer ci;
|
|
|
|
std::vector<std::string> args;
|
|
for (int i = 0; i < argc; ++i)
|
|
{
|
|
char buffer[1024];
|
|
std::wcstombs(buffer, argv[i], sizeof(buffer));
|
|
args.push_back(std::string(buffer));
|
|
}
|
|
CppUnit::TestRunner runner;
|
|
runner.addTest("CryptoTestSuite", CryptoTestSuite::suite());
|
|
return runner.run(args) ? 0 : 1;
|
|
}
|