direct_search_manager_test.cpp
Go to the documentation of this file.
1 
18 #include <algorithm>
19 
20 #include "gtest/gtest.h"
21 #include "ros/ros.h"
23 
24 using namespace directSearchWS;
25 
26 
27 TEST(DirectSearchManagerTest, CheckSearchedObjectTypesAreEquale) {
30 
31  ASSERT_TRUE(checkSearchedObjectTypesAreEquale(SOT1, SOT2));
32 
33  SOT1.push_back("PlateDeep");
34  ASSERT_FALSE(checkSearchedObjectTypesAreEquale(SOT1, SOT2));
35 
36  SOT2.push_back("Marker4");
37  ASSERT_FALSE(checkSearchedObjectTypesAreEquale(SOT1, SOT2));
38 
39  SOT2.push_back("PlateDeep");
40  ASSERT_FALSE(checkSearchedObjectTypesAreEquale(SOT1, SOT2));
41 
42  SOT1.push_back("Marker4");
43  ASSERT_TRUE(checkSearchedObjectTypesAreEquale(SOT1, SOT2));
44 
45  SOT1.push_back("Marker4");
46  ASSERT_FALSE(checkSearchedObjectTypesAreEquale(SOT1, SOT2));
47 
48  SOT2.push_back("Marker4");
49  ASSERT_TRUE(checkSearchedObjectTypesAreEquale(SOT1, SOT2));
50 }
51 
52 TEST(DirectSearchManagerTest, GetSearchedObjectTypesFromAWithoutB) {
55  SearchedObjectTypes AwithoutB;
56 
57  AwithoutB = getSearchedObjectTypesFromAWithoutB(A, B);
58  EXPECT_EQ(0, AwithoutB.size());
59 
60  A.push_back("PlateDeep");
61  B.push_back("Marker0");
62  AwithoutB = getSearchedObjectTypesFromAWithoutB(A, B);
63  ASSERT_EQ(1, AwithoutB.size());
64  EXPECT_EQ("PlateDeep", AwithoutB[0]);
65 
66  B.push_back("PlateDeep");
67  AwithoutB = getSearchedObjectTypesFromAWithoutB(A, B);
68  ASSERT_EQ(0, AwithoutB.size());
69 
70  A.push_back("PlateDeep");
71  AwithoutB = getSearchedObjectTypesFromAWithoutB(A, B);
72  ASSERT_EQ(0, AwithoutB.size());
73 
74  B.push_back("Marker0");
75  AwithoutB = getSearchedObjectTypesFromAWithoutB(A, B);
76  ASSERT_EQ(0, AwithoutB.size());
77 }
78 
79 
80 
std::vector< std::string > SearchedObjectTypes
Definition: ptu_tuple.hpp:27
bool checkSearchedObjectTypesAreEquale(const SearchedObjectTypes &searchecObjectTypes1, const SearchedObjectTypes &searchecObjectTypes2)
SearchedObjectTypes getSearchedObjectTypesFromAWithoutB(const SearchedObjectTypes &a, const SearchedObjectTypes &b)
TEST(DirectSearchManagerTest, CheckSearchedObjectTypesAreEquale)


asr_direct_search_manager
Author(s): Borella Jocelyn, Karrenbauer Oliver, Meißner Pascal
autogenerated on Wed Jan 8 2020 03:15:41