54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
#ifndef DOUWCO_HIVEMIND_TEST_HARNESS_HPP
|
|
#define DOUWCO_HIVEMIND_TEST_HARNESS_HPP
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
namespace DouwcoHivemind::Testing
|
|
{
|
|
class TestResult
|
|
{
|
|
public:
|
|
std::string testName;
|
|
bool passed;
|
|
std::string message;
|
|
|
|
TestResult(const std::string& name, bool success, const std::string& msg = "")
|
|
: testName(name), passed(success), message(msg) {}
|
|
};
|
|
|
|
class TestHarness
|
|
{
|
|
private:
|
|
static std::vector<TestResult> testResults;
|
|
|
|
public:
|
|
static void runAllTests();
|
|
static void addTestResult(const TestResult& result);
|
|
static std::string getTestResults();
|
|
static int getPassedCount();
|
|
static int getFailedCount();
|
|
static int getTotalCount();
|
|
|
|
// Test categories
|
|
static void runCreepTests();
|
|
static void runWorkerTests();
|
|
static void runSupplierTests();
|
|
static void runPathTests();
|
|
static void runSpawnTests();
|
|
static void runUtilityTests();
|
|
};
|
|
|
|
// Mock classes for testing
|
|
namespace Mocks
|
|
{
|
|
class MockCreep;
|
|
class MockRoom;
|
|
class MockSource;
|
|
class MockStructure;
|
|
class MockGame;
|
|
}
|
|
}
|
|
|
|
#endif // DOUWCO_HIVEMIND_TEST_HARNESS_HPP
|