YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
fakeLocalizer_test.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#include <yarp/os/Network.h>
12
13#include <catch2/catch_amalgamated.hpp>
14#include <harness.h>
15
16using namespace yarp::dev;
17using namespace yarp::os;
18
19TEST_CASE("dev::fakeLocalizer", "[yarp::dev]")
20{
21 YARP_REQUIRE_PLUGIN("fakeLocalizer", "device");
22
23 Network::setLocalMode(true);
24
25 SECTION("Checking fakeLocalizer device")
26 {
27 PolyDriver dd;
29
31 {
33 p_cfg.put("device", "fakeLocalizer");
34 REQUIRE(dd.open(p_cfg));
36 }
37
38 dd.view(iloc);
40
41 //"Close all polydrivers and check"
42 {
43 CHECK(dd.close());
44 }
45 }
46
47 Network::setLocalMode(false);
48}
bool view(T *&x)
Get an interface to the device driver.
ILocalization2D interface.
A container for a device driver.
Definition PolyDriver.h:23
bool close() override
Close the DeviceDriver.
bool open(const std::string &txt)
Construct and configure a device by its common name.
A mini-server for performing network communication in the background.
A class for storing options and configuration information.
Definition Property.h:32
TEST_CASE("dev::fakeLocalizer", "[yarp::dev]")
void exec_iLocalization2D_test_1(yarp::dev::Nav2D::ILocalization2D *iloc)
void exec_params_test(yarp::dev::PolyDriver *pdrv)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.