Skip to content
Snippets Groups Projects
Commit efa7a2e1 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

[skip ci] wip

parent f270afad
No related branches found
No related tags found
1 merge request!25Draft: Resolve "Adapt to new sensor constructors in core"
...@@ -34,6 +34,10 @@ wolf_add_gtest(gtest_force_torque_delta_tools gtest_force_torque_delta_tools.cpp ...@@ -34,6 +34,10 @@ wolf_add_gtest(gtest_force_torque_delta_tools gtest_force_torque_delta_tools.cpp
# processor_point_feet_nomove test # processor_point_feet_nomove test
wolf_add_gtest(gtest_processor_point_feet_nomove gtest_processor_point_feet_nomove.cpp) wolf_add_gtest(gtest_processor_point_feet_nomove gtest_processor_point_feet_nomove.cpp)
# Load bodydynamics tests
wolf_add_gtest(gtest_load_bodydynamics gtest_load_bodydynamics.cpp)
wolf_add_gtest(gtest_no_load_bodydynamics gtest_no_load_bodydynamics.cpp)
# schema test # schema test
wolf_add_gtest(gtest_schema gtest_schema.cpp) wolf_add_gtest(gtest_schema gtest_schema.cpp)
......
// WOLF - Copyright (C) 2020,2021,2022,2023,2024
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Solà Ortega (jsola@iri.upc.edu) and
// Joan Vallvé Navarro (jvallve@iri.upc.edu)
// All rights reserved.
//
// This file is part of WOLF: http://www.iri.upc.edu/wolf
// WOLF is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <gtest/gtest.h>
#include "bodydynamics/utils/load_bodydynamics.h"
#include <core/sensor/factory_sensor.h>
using namespace wolf;
// NOTE: This test and 'gtest_no_load_bodydynamics' complements each other
// In this test we load 'bodydynamics' and 'core' should be automatically loaded.
// To check if a plugin was loaded, we check the registering of a sensor to the factories:
// "SensorOdom2d" for 'core'
// "ProcessorForceTorquePreint" for 'bodydynamics'
WOLF_LOAD_BODYDYNAMICS;
TEST(load_bodydynamics, DummyTestExample)
{
EXPECT_TRUE(FactorySensorNode::isCreatorRegistered("SensorOdom2d"));
EXPECT_TRUE(FactoryProcessorNode::isCreatorRegistered("ProcessorForceTorquePreint"));
}
int main(int argc, char **argv)
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
// WOLF - Copyright (C) 2020,2021,2022,2023,2024
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Solà Ortega (jsola@iri.upc.edu) and
// Joan Vallvé Navarro (jvallve@iri.upc.edu)
// All rights reserved.
//
// This file is part of WOLF: http://www.iri.upc.edu/wolf
// WOLF is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <gtest/gtest.h>
#include <core/utils/load_core.h>
#include <core/sensor/factory_sensor.h>
using namespace wolf;
// NOTE: This test and 'gtest_load_bodydynamics' complements each other
// In this test we load 'core' but not 'bodydynamics'
// To check if a plugin was loaded, we check the registering of a sensor to the FactorySensorNode:
// "SensorOdom2d" for 'core'
// "ProcessorForceTorquePreint" for 'bodydynamics'
WOLF_LOAD_CORE;
TEST(no_load_bodydynamics, DummyTestExample)
{
EXPECT_TRUE(FactorySensorNode::isCreatorRegistered("SensorOdom2d"));
EXPECT_FALSE(FactoryProcessorNode::isCreatorRegistered("ProcessorForceTorquePreint"));
}
int main(int argc, char **argv)
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment