From 551de4adb7a4c5863431ae7b15e6709d3c75cda5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Fri, 2 Aug 2019 20:33:12 +0200
Subject: [PATCH] Add test parser: follow real YAML file

---
 test/gtest_parser_yaml.cpp | 7 +++++++
 test/yaml/params1.yaml     | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/test/gtest_parser_yaml.cpp b/test/gtest_parser_yaml.cpp
index deaf23810..a61d6d4f1 100644
--- a/test/gtest_parser_yaml.cpp
+++ b/test/gtest_parser_yaml.cpp
@@ -40,6 +40,13 @@ TEST(ParserYAML, FollowFile)
   EXPECT_EQ(params["my_proc_test/max_buff_length"], "100");
   EXPECT_EQ(params["my_proc_test/voting_active"], "false");
 }
+TEST(ParserYAML, FollowOdom3D)
+{
+  auto parser = parse("test/yaml/params1.yaml", wolf_root);
+  auto params = parser.getParams();
+  EXPECT_EQ(params["my_proc_odom3d/max_buff_length"], "10");
+  EXPECT_EQ(params["my_proc_odom3d/max_time_span"], "0.2");
+}
 TEST(ParserYAML, JumpFile)
 {
   auto parser = parse("test/yaml/params3.yaml", wolf_root);
diff --git a/test/yaml/params1.yaml b/test/yaml/params1.yaml
index e23b1a484..752d2c26b 100644
--- a/test/yaml/params1.yaml
+++ b/test/yaml/params1.yaml
@@ -28,6 +28,11 @@ config:
       name: "my_proc_test"
       sensor_name: "odom"
       follow: "test/yaml/params3.1.yaml"
+    -
+      type: "ODOM 3D"
+      name: "my_proc_odom3d"
+      sensor_name: "odom"
+      follow: "test/yaml/processor_odom_3D.yaml"
 files:
   - "/home/jcasals/workspace/wip/wolf/lib/libsensor_odo.so"
   - "/home/jcasals/workspace/wip/wolf/lib/librange_bearing.so"
\ No newline at end of file
-- 
GitLab