summaryrefslogtreecommitdiff
path: root/test/tools_test.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 19:57:00 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 20:06:56 +0100
commit6af7742c35ecdf2831908443ca0e04bf23317a96 (patch)
tree9ada42d1d4b6bcb2618c1325f155429d2035808a /test/tools_test.cc
parent648c89e879f739f82ed6dba7df7243e54b98601f (diff)
Rename Configuation struct to configuration and make get/has functions member functions.
Diffstat (limited to 'test/tools_test.cc')
-rw-r--r--test/tools_test.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/tools_test.cc b/test/tools_test.cc
index acd4219..8455ce6 100644
--- a/test/tools_test.cc
+++ b/test/tools_test.cc
@@ -87,16 +87,20 @@ std::string conf_host_cxx{};
std::string conf_build_cxx{};
}
-namespace ctor {
-const std::string& getConfiguration(const std::string& key,
- const std::string& defval)
+const ctor::configuration& ctor::get_configuration()
{
- if(key == cfg::host_cxx)
+ static ctor::configuration cfg;
+ return cfg;
+}
+
+const std::string& ctor::configuration::get(const std::string& key, const std::string& defval) const
+{
+ if(key == ctor::cfg::host_cxx)
{
return conf_host_cxx;
}
- if(key == cfg::build_cxx)
+ if(key == ctor::cfg::build_cxx)
{
return conf_build_cxx;
}
@@ -106,7 +110,6 @@ const std::string& getConfiguration(const std::string& key,
static std::string res{};
return res;
}
-} // namespace ctor::
class ToolsTest
: public uUnit