aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/testing/Testing.hpp
diff options
context:
space:
mode:
author CptAlanSmith <123112708+CptAlanSmith@users.noreply.github.com>2023-09-23 20:25:15 +0200
committer GitHub <noreply@github.com>2023-09-23 20:25:15 +0200
commit005a8026bb424779a146e00cc48621ff1d72b807 (patch)
treedde15211e31d861b61711bf6aebdeb8713393d53 /src/openvic-simulation/testing/Testing.hpp
parentebea2e473eefa3945508b0bf622a472b62d70d3b (diff)
Testing (#23)
* Fixes for building scons * Initial proof of concept auto-testing Shows how we can pull loaded data and display it back * Re-did headless Because hubert insisted it be done like this ;) * Auto-Testing Framework Basics * Requirements Calculations * Fix for messy merge (teach me to use merge tools) * Fixing up misc merge issues to fully reconcile with master changes * Re-added missing getters * Move of testing files due to folder reorgs * Use new accessors + int reading fix --------- Co-authored-by: Hop311 <hop3114@gmail.com>
Diffstat (limited to 'src/openvic-simulation/testing/Testing.hpp')
-rw-r--r--src/openvic-simulation/testing/Testing.hpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/openvic-simulation/testing/Testing.hpp b/src/openvic-simulation/testing/Testing.hpp
new file mode 100644
index 0000000..35e8a96
--- /dev/null
+++ b/src/openvic-simulation/testing/Testing.hpp
@@ -0,0 +1,44 @@
+#pragma once
+#include <testing/TestScript.hpp>
+#include <GameManager.hpp>
+#include <iostream>
+#include <vector>
+
+#include <testing/test_scripts/A_001_file_tests.cpp>
+#include <testing/test_scripts/A_002_economy_tests.cpp>
+#include <testing/test_scripts/A_003_military_unit_tests.cpp>
+#include <testing/test_scripts/A_004_networking_tests.cpp>
+#include <testing/test_scripts/A_005_nation_tests.cpp>
+#include <testing/test_scripts/A_006_politics_tests.cpp>
+
+namespace OpenVic {
+
+ class Testing {
+
+ public:
+ GameManager& game_manager;
+ Map& map;
+ BuildingManager& building_manager;
+ GoodManager& good_manager;
+ PopManager& pop_manager;
+ GameAdvancementHook& clock;
+
+ std::vector<TestScript*> test_scripts = std::vector<TestScript*>();
+
+ //// Prototype test script
+ //const BuildingType* building_type = building_manager->get_building_type_by_identifier("building_fort");
+ //std::cout << "building_fort"
+ // << " build time is " << building_type->get_build_time() << std::endl;
+ //std::cout << "building_fort"
+ // << " identifier is " << building_type->get_identifier() << std::endl;
+ //std::cout << "building_fort"
+ // << " max level is " << int(building_type->get_max_level()) << std::endl;
+ //for (const auto& good : good_manager->get_goods())
+ // std::cout << good.get_identifier() << " price = " << good.get_base_price() << std::endl;
+
+ Testing(GameManager& g_manager);
+ ~Testing();
+
+ void report_results();
+ };
+}