From 68ff2f08a7481ede1110dc13b3f5750e8f6dad4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Sat, 5 Oct 2019 14:33:55 +0200 Subject: [PATCH] Test Summary: Ensure Uppercase Case Names in Result Sets Simplifies introduction of a new writer for the summary file. --- tests/test_Summary.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/test_Summary.cpp b/tests/test_Summary.cpp index 2f28e734d..8826e962c 100644 --- a/tests/test_Summary.cpp +++ b/tests/test_Summary.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -57,6 +58,16 @@ namespace { { return unit::cubic(unit::meter) / unit::day; } + + std::string toupper(std::string input) + { + for (auto& c : input) { + const auto uc = std::toupper(static_cast(c)); + c = static_cast(uc); + } + + return input; + } } // Anonymous namespace SegmentResultHelpers { @@ -268,14 +279,14 @@ struct setup { /*-----------------------------------------------------------------*/ - setup( const std::string& fname , const char* path = "summary_deck.DATA") : + setup(std::string fname, const std::string& path = "summary_deck.DATA") : deck( Parser().parseFile( path) ), es( deck ), grid( es.getInputGrid() ), schedule( deck, grid, es.get3DProperties(), es.runspec()), config( deck, schedule, es.getTableManager()), wells( result_wells() ), - name( fname ), + name( toupper(std::move(fname)) ), ta( test_work_area_alloc("summary_test")) { }