YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
map2DStorage_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
7#include <yarp/dev/IMap2D.h>
10#include <yarp/os/Network.h>
11#include <yarp/os/LogStream.h>
12#include <yarp/dev/PolyDriver.h>
15
16#include <catch2/catch_amalgamated.hpp>
17#include <harness.h>
18
19using namespace yarp::dev;
20using namespace yarp::dev::Nav2D;
21using namespace yarp::sig;
22using namespace yarp::os;
23
24TEST_CASE("dev::Map2DStorageTest", "[yarp::dev]")
25{
26 YARP_REQUIRE_PLUGIN("map2DStorage", "device");
27
28 Network::setLocalMode(true);
29
30 SECTION("Checking map2DStorage device without loading files")
31 {
33 IMap2D* imap = nullptr;
34
36 {
38 pmapstorage_cfg.put("device", "map2DStorage");
41 }
42
43 //execute tests
46
47 //"Close all polydrivers and check"
48 {
50 }
51 }
52
53 SECTION("Checking map2DStorage device loading files (1/2)")
54 {
56 IMap2D* imap = nullptr;
57
59 {
61 pmapstorage_cfg.put("device", "map2DStorage");
62 pmapstorage_cfg.put("mapCollectionContext", "erraticContext");
64 }
65 }
66
67 /*
68 SECTION("Checking map2DStorage device loading files (2/2)")
69 {
70 PolyDriver ddmapstorage;
71 IMap2D* imap = nullptr;
72
74 {
75 Property pmapstorage_cfg;
76 pmapstorage_cfg.put("device", "map2DStorage");
77 pmapstorage_cfg.put("mapCollectionContext", "exampleContext");
78 REQUIRE(ddmapstorage.open(pmapstorage_cfg));
79 REQUIRE(ddmapstorage.view(imap));
80 }
81
82 //execute tests
83 yarp::dev::tests::exec_iMap2D_test_1(imap);
84 yarp::dev::tests::exec_iMap2D_test_2(imap);
85
86 //"Close all polydrivers and check"
87 {
88 CHECK(ddmapstorage.close());
89 }
90 }
91 */
92
93 Network::setLocalMode(false);
94}
contains the definition of a Map2DArea type
contains the definition of a Map2DLocation type
IMap2D Interface.
Definition IMap2D.h:30
A container for a device driver.
Definition PolyDriver.h:23
A mini-server for performing network communication in the background.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A class for storing options and configuration information.
Definition Property.h:33
TEST_CASE("dev::Map2DStorageTest", "[yarp::dev]")
void exec_iMap2D_test_1(IMap2D *imap)
Definition IMap2DTest.h:20
void exec_iMap2D_test_2(IMap2D *imap)
Definition IMap2DTest.h:72
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.