From 127ca294056817bc5814ef5516b29a67ff3fa3bb Mon Sep 17 00:00:00 2001 From: CptAlanSmith <123112708+CptAlanSmith@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:51:49 +0100 Subject: Testing (#28) * Dataloader stubs + default compat path + bits+bobs * Followup big dataloader commit * Fixes for building scons * Initial proof of concept auto-testing Shows how we can pull loaded data and display it back * data-loader include * 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 * Update of file tests * Test scripting updates - elimnination of issues with data variables hanging over from big merges Routed gamemanager down to scripts on execute * Update StringUtils.hpp * Initial pipeline building * Pipe fabrication * Continued work on goods testing, removal of pragma once lines * Finish of economy tests, initial results outputting * Output of results * Removal of direct.h for cross compatibility --------- Co-authored-by: Hop311 --- src/openvic-simulation/testing/Requirement.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/openvic-simulation/testing/Requirement.cpp') diff --git a/src/openvic-simulation/testing/Requirement.cpp b/src/openvic-simulation/testing/Requirement.cpp index 4c46f00..d99153a 100644 --- a/src/openvic-simulation/testing/Requirement.cpp +++ b/src/openvic-simulation/testing/Requirement.cpp @@ -7,9 +7,18 @@ std::string Requirement::get_id() { return id; } std::string Requirement::get_text() { return text; } std::string Requirement::get_acceptance_criteria() { return acceptance_criteria; } bool Requirement::get_pass() { return pass; } +bool Requirement::get_tested() { return tested; } +std::string Requirement::get_target_value() { return target_value; } +std::string Requirement::get_actual_value() { return actual_value; } // Setters void Requirement::set_id(std::string in_id) { id = in_id; } void Requirement::set_text(std::string in_text) { text = in_text; } void Requirement::set_acceptance_criteria(std::string in_acceptance_criteria) { acceptance_criteria = in_acceptance_criteria; } -void Requirement::set_pass(bool in_pass) { pass = in_pass; } +void Requirement::set_pass(bool in_pass) { + pass = in_pass; + set_tested(true); // Ever setting a pass condition implies it has been tested +} +void Requirement::set_tested(bool in_tested) { tested = in_tested; } +void Requirement::set_target_value(std::string in_target_value) { target_value = in_target_value; } +void Requirement::set_actual_value(std::string in_actual_value) { actual_value = in_actual_value; } -- cgit v1.2.3-56-ga3b1