aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/testing/Testing.cpp
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.cpp
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.cpp')
-rw-r--r--src/openvic-simulation/testing/Testing.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/openvic-simulation/testing/Testing.cpp b/src/openvic-simulation/testing/Testing.cpp
new file mode 100644
index 0000000..fcfe2cc
--- /dev/null
+++ b/src/openvic-simulation/testing/Testing.cpp
@@ -0,0 +1,43 @@
+#include <testing/Testing.hpp>
+#include <testing/TestScript.hpp>
+
+using namespace OpenVic;
+
+Testing::Testing(GameManager& g_manager)
+ : game_manager { g_manager },
+ map { g_manager.get_map() },
+ building_manager { g_manager.get_building_manager() },
+ good_manager { g_manager.get_good_manager() },
+ pop_manager { g_manager.get_pop_manager() },
+ clock { g_manager.get_clock() } {
+
+ // Constructor for the tests will add requirements
+ // Then execute the script
+ A_001_file_tests* a_001_file_tests = new A_001_file_tests();
+ test_scripts.push_back(a_001_file_tests);
+ A_002_economy_tests* a_002_economy_tests = new A_002_economy_tests();
+ test_scripts.push_back(a_002_economy_tests);
+ A_003_military_unit_tests* a_003_military_unit_tests = new A_003_military_unit_tests();
+ test_scripts.push_back(a_003_military_unit_tests);
+ A_004_networking_tests* a_004_networking_tests = new A_004_networking_tests();
+ test_scripts.push_back(a_004_networking_tests);
+ A_005_nation_tests* a_005_nation_tests = new A_005_nation_tests();
+ test_scripts.push_back(a_005_nation_tests);
+ A_006_politics_tests* a_006_politics_tests = new A_006_politics_tests();
+ test_scripts.push_back(a_006_politics_tests);
+}
+
+Testing::~Testing() {
+ for (TestScript* test_script : test_scripts) {
+ delete test_script;
+ }
+}
+
+void Testing::report_results() {
+ for (int i = 0; i < test_scripts.size(); i++) {
+
+ }
+
+ // Create Summary File
+
+}