GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: src/catkin/dg_control/dg_tools/tests/test_dg_tools.cpp Lines: 16 16 100.0 %
Date: 2020-04-15 11:50:02 Branches: 29 106 27.4 %

Line Branch Exec Source
1
/**
2
 * @file test_dg_tools.cpp
3
 * @author Maximilien Naveau (maximilien.naveau@gmail.com)
4
 * @brief
5
 * @version 0.1
6
 * @date 2019-02-19
7
 *
8
 * @copyright Copyright (c) 2019
9
 *
10
 */
11
12
#include <gtest/gtest.h>
13
#include "dg_tools/control/control_pd.hpp"
14
#include "dg_tools/control/calibrator.hpp"
15
16
/**
17
 * @brief The DISABLED_TestDGTools class is used to disable test.
18
 */
19
class DISABLED_TestDGTools : public ::testing::Test {};
20
21
/**
22
 * @brief The TestDGTools class: test suit template for setting up
23
 * the unit tests for the Device.
24
 */
25
4
class TestDGTools : public ::testing::Test {
26
protected:
27
  /**
28
   * @brief SetUp, is executed before the unit tests
29
   */
30
2
  void SetUp(){
31
2
  }
32
33
  /**
34
   * @brief TearDown, is executed after teh unit tests
35
   */
36
2
  void TearDown() {
37
2
  }
38
};
39
40
41
/**
42
 * @brief test_start_stop_ros_services, test the start/stop dynamic graph ROS
43
 * services
44
 */
45
5
TEST_F(TestDGTools, test_control_pd_constructor)
46
{
47

2
  dynamicgraph::sot::PDController pd("a_pd_controller");
48



1
  ASSERT_EQ("PDController", pd.CLASS_NAME);
49



1
  ASSERT_EQ("PDController", pd.getClassName());
50




1
  ASSERT_EQ("a_pd_controller", pd.getName());
51
}
52
53
5
TEST_F(TestDGTools, test_control_calibrator_constructor)
54
{
55

2
  dynamicgraph::sot::Calibrator pd("a_calibrator");
56



1
  ASSERT_EQ("Calibrator", pd.CLASS_NAME);
57



1
  ASSERT_EQ("Calibrator", pd.getClassName());
58




1
  ASSERT_EQ("a_calibrator", pd.getName());
59

3
}