aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/testing
diff options
context:
space:
mode:
author CptAlanSmith <CptAlanSmith@gmail.com>2023-09-25 23:18:19 +0200
committer CptAlanSmith <CptAlanSmith@gmail.com>2023-09-28 21:06:12 +0200
commit322bc603709d7778b808878c6df63d6cd1f4357b (patch)
treea5e26838685d2fc6ac72e397919095e609a69b8f /src/openvic-simulation/testing
parentae0be2a8d2e1b717f6c4a4617096f17089ce8701 (diff)
Economy test finish
Diffstat (limited to 'src/openvic-simulation/testing')
-rw-r--r--src/openvic-simulation/testing/test_scripts/A_002_economy_tests.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/openvic-simulation/testing/test_scripts/A_002_economy_tests.cpp b/src/openvic-simulation/testing/test_scripts/A_002_economy_tests.cpp
index aa0e59f..9f0ddbd 100644
--- a/src/openvic-simulation/testing/test_scripts/A_002_economy_tests.cpp
+++ b/src/openvic-simulation/testing/test_scripts/A_002_economy_tests.cpp
@@ -504,7 +504,10 @@ namespace OpenVic {
}
void check_base_price(std::string identifier, std::string value, std::string req_name) {
- std::string base_price = get_game_manager()->get_good_manager().get_good_by_identifier(identifier)->get_base_price().to_string();
+ fixed_point_t base_price_fp = get_game_manager()->get_good_manager().get_good_by_identifier(identifier)->get_base_price();
+ std::stringstream ss;
+ ss << std::fixed << std::setprecision(1) << base_price_fp.to_double();
+ std::string base_price = ss.str();
Requirement* req = get_requirement_by_id(req_name);
req->set_target_value(value);
req->set_actual_value(base_price);