mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-08-08 09:01:48 +02:00
Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
This commit is contained in:
17
vendor/POCO/Redis/testsuite/src/Driver.cpp
vendored
Normal file
17
vendor/POCO/Redis/testsuite/src/Driver.cpp
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// Driver.cpp
|
||||
//
|
||||
// Console-based test driver for Poco MongoDB.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "CppUnit/TestRunner.h"
|
||||
#include "RedisTestSuite.h"
|
||||
|
||||
|
||||
CppUnitMain(RedisTestSuite)
|
3010
vendor/POCO/Redis/testsuite/src/RedisTest.cpp
vendored
Normal file
3010
vendor/POCO/Redis/testsuite/src/RedisTest.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
103
vendor/POCO/Redis/testsuite/src/RedisTest.h
vendored
Normal file
103
vendor/POCO/Redis/testsuite/src/RedisTest.h
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// RedisTest.h
|
||||
//
|
||||
// Definition of the RedisTest class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef RedisTest_INCLUDED
|
||||
#define RedisTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Redis/Redis.h"
|
||||
#include "Poco/Redis/Client.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
|
||||
|
||||
class RedisTest: public CppUnit::TestCase
|
||||
{
|
||||
public:
|
||||
RedisTest(const std::string& name);
|
||||
|
||||
|
||||
virtual ~RedisTest();
|
||||
|
||||
void testAPPEND();
|
||||
void testBLPOP();
|
||||
void testBRPOP();
|
||||
void testDECR();
|
||||
void testECHO();
|
||||
void testError();
|
||||
void testEVAL();
|
||||
void testHDEL();
|
||||
void testHEXISTS();
|
||||
void testHGETALL();
|
||||
void testHINCRBY();
|
||||
void testHKEYS();
|
||||
void testHMGET();
|
||||
void testHMSET();
|
||||
void testHSET();
|
||||
void testHSTRLEN();
|
||||
void testHVALS();
|
||||
void testINCR();
|
||||
void testINCRBY();
|
||||
void testLINDEX();
|
||||
void testLINSERT();
|
||||
void testLPOP();
|
||||
void testLREM();
|
||||
void testLSET();
|
||||
void testLTRIM();
|
||||
void testMULTI();
|
||||
void testMSET();
|
||||
void testMSETWithMap();
|
||||
void testPING();
|
||||
void testPipeliningWithSendCommands();
|
||||
void testPipeliningWithWriteCommand();
|
||||
void testPubSub();
|
||||
void testSADD();
|
||||
void testSCARD();
|
||||
void testSDIFF();
|
||||
void testSDIFFSTORE();
|
||||
void testSET();
|
||||
void testSINTER();
|
||||
void testSINTERSTORE();
|
||||
void testSISMEMBER();
|
||||
void testSMEMBERS();
|
||||
void testSMOVE();
|
||||
void testSPOP();
|
||||
void testSRANDMEMBER();
|
||||
void testSREM();
|
||||
void testSUNION();
|
||||
void testSUNIONSTORE();
|
||||
void testSTRLEN();
|
||||
void testRENAME();
|
||||
void testRENAMENX();
|
||||
void testRPOP();
|
||||
void testRPOPLPUSH();
|
||||
void testRPUSH();
|
||||
|
||||
void testPool();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
|
||||
void delKey(const std::string& key);
|
||||
|
||||
std::string _host;
|
||||
unsigned _port;
|
||||
static bool _connected;
|
||||
static Poco::Redis::Client _redis;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // RedisTest_INCLUDED
|
22
vendor/POCO/Redis/testsuite/src/RedisTestSuite.cpp
vendored
Normal file
22
vendor/POCO/Redis/testsuite/src/RedisTestSuite.cpp
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// RedisTestSuite.cpp
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "RedisTestSuite.h"
|
||||
#include "RedisTest.h"
|
||||
|
||||
|
||||
CppUnit::Test* RedisTestSuite::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("RedisTestSuite");
|
||||
|
||||
pSuite->addTest(RedisTest::suite());
|
||||
|
||||
return pSuite;
|
||||
}
|
27
vendor/POCO/Redis/testsuite/src/RedisTestSuite.h
vendored
Normal file
27
vendor/POCO/Redis/testsuite/src/RedisTestSuite.h
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// RedisTestSuite.h
|
||||
//
|
||||
// Definition of the RedisTestSuite class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef RedisTestSuite_INCLUDED
|
||||
#define RedisTestSuite_INCLUDED
|
||||
|
||||
|
||||
#include "CppUnit/TestSuite.h"
|
||||
|
||||
|
||||
class RedisTestSuite
|
||||
{
|
||||
public:
|
||||
static CppUnit::Test* suite();
|
||||
};
|
||||
|
||||
|
||||
#endif // RedisTestSuite_INCLUDED
|
30
vendor/POCO/Redis/testsuite/src/WinCEDriver.cpp
vendored
Normal file
30
vendor/POCO/Redis/testsuite/src/WinCEDriver.cpp
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// WinCEDriver.cpp
|
||||
//
|
||||
// Console-based test driver for Windows CE.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "CppUnit/TestRunner.h"
|
||||
#include "RedisTestSuite.h"
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
int _tmain(int argc, wchar_t* argv[])
|
||||
{
|
||||
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("RedisTestSuite", RedisTestSuite::suite());
|
||||
return runner.run(args) ? 0 : 1;
|
||||
}
|
28
vendor/POCO/Redis/testsuite/src/WinDriver.cpp
vendored
Normal file
28
vendor/POCO/Redis/testsuite/src/WinDriver.cpp
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// WinDriver.cpp
|
||||
//
|
||||
// Windows test driver for Poco MongoDB.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "WinTestRunner/WinTestRunner.h"
|
||||
#include "RedisTestSuite.h"
|
||||
|
||||
|
||||
class TestDriver: public CppUnit::WinTestRunnerApp
|
||||
{
|
||||
void TestMain()
|
||||
{
|
||||
CppUnit::WinTestRunner runner;
|
||||
runner.addTest(RedisTestSuite::suite());
|
||||
runner.run();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
TestDriver theDriver;
|
Reference in New Issue
Block a user