From 89ff6973a2820451e0e23c670a1686ebc3a35cc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Thu, 18 Jul 2019 20:21:34 +0300
Subject: [PATCH] COmment out API with default YAML

---
 include/core/utils/params_server.hpp | 16 ++++++++--------
 test/gtest_param_server.cpp          | 25 +++++++++++++------------
 2 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/include/core/utils/params_server.hpp b/include/core/utils/params_server.hpp
index 94e8f1a84..c8d74c4df 100644
--- a/include/core/utils/params_server.hpp
+++ b/include/core/utils/params_server.hpp
@@ -68,14 +68,14 @@ public:
         _params.insert(std::pair<std::string, std::string>(key, value));
     }
 
-    template<typename T>
-    T getParam(std::string key, std::string def_value) const {
-        if(_params.find(key) != _params.end()){
-            return converter<T>::convert(_params.find(key)->second);
-        }else{
-            return converter<T>::convert(def_value);
-        }
-    }
+//    template<typename T>
+//    T getParam(std::string key, std::string def_value) const {
+//        if(_params.find(key) != _params.end()){
+//            return converter<T>::convert(_params.find(key)->second);
+//        }else{
+//            return converter<T>::convert(def_value);
+//        }
+//    }
 
     template<typename T>
     T getParam(std::string key) const {
diff --git a/test/gtest_param_server.cpp b/test/gtest_param_server.cpp
index 00c6c099f..bfa888fa7 100644
--- a/test/gtest_param_server.cpp
+++ b/test/gtest_param_server.cpp
@@ -16,18 +16,19 @@ ParserYAML parse(string _file, string _path_root)
   return parser;
 }
 
-TEST(ParamsServer, Default)
-{
-  auto parser = parse("test/yaml/params1.yaml", wolf_root);
-  auto params = parser.getParams();
-  ParamsServer server = ParamsServer(params, parser.sensorsSerialization(), parser.processorsSerialization());
-  EXPECT_EQ(server.getParam<double>("should_not_exist", "2.6"), 2.6);
-  EXPECT_EQ(server.getParam<bool>("my_proc_test/voting_active", "true"), false);
-  EXPECT_NE(server.getParam<unsigned int>("my_proc_test/time_tolerance", "23"), 23);
-  EXPECT_THROW({ server.getParam<unsigned int>("test error"); }, std::runtime_error);
-  EXPECT_NE(server.getParam<unsigned int>("my_proc_test/time_tolerance"), 23);
-  EXPECT_EQ(server.getParam<bool>("my_proc_test/voting_active"), false);
-}
+//TEST(ParamsServer, Default)
+//{
+//  auto parser = parse("test/yaml/params1.yaml", wolf_root);
+//  auto params = parser.getParams();
+//  ParamsServer server = ParamsServer(params, parser.sensorsSerialization(), parser.processorsSerialization());
+//  EXPECT_EQ(server.getParam<double>("should_not_exist", "2.6"), 2.6);
+//  EXPECT_EQ(server.getParam<bool>("my_proc_test/voting_active", "true"), false);
+//  EXPECT_NE(server.getParam<unsigned int>("my_proc_test/time_tolerance", "23"), 23);
+//  EXPECT_THROW({ server.getParam<unsigned int>("test error"); }, std::runtime_error);
+//  EXPECT_NE(server.getParam<unsigned int>("my_proc_test/time_tolerance"), 23);
+//  EXPECT_EQ(server.getParam<bool>("my_proc_test/voting_active"), false);
+//}
+
 int main(int argc, char **argv)
 {
   testing::InitGoogleTest(&argc, argv);
-- 
GitLab