Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit41c1f2e

Browse files
committed
fix warnings
1 parentc74fa94 commit41c1f2e

20 files changed

+165
-36
lines changed

‎btcpp_logo.png‎

9.73 KB
Loading

‎btcpp_logo.svg‎

Lines changed: 128 additions & 0 deletions
Loading

‎tests/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
######################################################
22
# TESTS
33

4-
include_directories(include)
4+
include_directories(include${PROJECT_SOURCE_DIR}/3rdparty)
55

66
set(BT_TESTS
77
src/action_test_node.cpp

‎tests/gtest_factory.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static const char* xml_text_subtree = R"(
7777

7878
staticconstchar* xml_text_subtree_part1 =R"(
7979
80-
<root>
80+
<root BTCPP_format="4">
8181
<BehaviorTree ID="MainTree">
8282
<Fallback name="root_selector">
8383
<SubTree ID="DoorClosedSubtree" />
@@ -88,7 +88,7 @@ static const char* xml_text_subtree_part1 = R"(
8888

8989
staticconstchar* xml_text_subtree_part2 =R"(
9090
91-
<root>
91+
<root BTCPP_format="4">
9292
<BehaviorTree ID="DoorClosedSubtree">
9393
<Sequence name="door_sequence">
9494
<Decorator ID="Inverter">
@@ -168,7 +168,7 @@ TEST(BehaviorTreeFactory, Subtree)
168168
TEST(BehaviorTreeFactory, Issue7)
169169
{
170170
const std::string xml_text_issue =R"(
171-
<root>
171+
<root BTCPP_format="4">
172172
<BehaviorTree ID="ReceiveGuest">
173173
</BehaviorTree>
174174
</root>)";
@@ -183,7 +183,7 @@ TEST(BehaviorTreeFactory, Issue7)
183183

184184
staticconstchar* xml_ports_subtree =R"(
185185
186-
<root BTCPP_format="4"format="4"main_tree_to_execute="MainTree">
186+
<root BTCPP_format="4" main_tree_to_execute="MainTree">
187187
188188
<BehaviorTree ID="TalkToMe">
189189
<Sequence>

‎tests/gtest_logger_zmq.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ TEST(LoggerZMQ, ZMQLoggerDeletesCleanlyAfterTickingTree)
77
{
88
// GIVEN we create a behavior tree through the BT factory and attach a ZMQ publisher to it
99
staticconstexprauto XML =R"(
10-
<root>
10+
<root BTCPP_format="4">
1111
<BehaviorTree>
1212
<SetBlackboard output_key="arg1" value="1" />
1313
</BehaviorTree>
@@ -30,7 +30,7 @@ TEST(LoggerZMQ, ZMQLoggerDeletesCleanlyAfterNotTickingTree)
3030
{
3131
// GIVEN we create a behavior tree through the BT factory and attach a ZMQ publisher to it
3232
staticconstexprauto XML =R"(
33-
<root>
33+
<root BTCPP_format="4">
3434
<BehaviorTree>
3535
<SetBlackboard output_key="arg1" value="1" />
3636
</BehaviorTree>

‎tests/gtest_switch.cpp‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ struct SwitchTest : testing::Test
4444
BT::NodeConfig simple_switch_config_;
4545

4646
SwitchTest() :
47-
action_1("action_1", milliseconds(100)),
48-
action_42("action_42", milliseconds(100)),
49-
action_def("action_default", milliseconds(100))
47+
action_1("action_1", milliseconds(200)),
48+
action_42("action_42", milliseconds(200)),
49+
action_def("action_default", milliseconds(200))
5050
{
5151
BT::PortsRemapping input;
5252
input.insert(std::make_pair("variable","{my_var}"));
@@ -78,7 +78,7 @@ TEST_F(SwitchTest, DefaultCase)
7878
ASSERT_EQ(NodeStatus::RUNNING, action_def.status());
7979
ASSERT_EQ(NodeStatus::RUNNING, state);
8080

81-
std::this_thread::sleep_for(milliseconds(110));
81+
std::this_thread::sleep_for(milliseconds(300));
8282
state = root->executeTick();
8383

8484
ASSERT_EQ(NodeStatus::IDLE, action_1.status());
@@ -97,7 +97,7 @@ TEST_F(SwitchTest, Case1)
9797
ASSERT_EQ(NodeStatus::IDLE, action_def.status());
9898
ASSERT_EQ(NodeStatus::RUNNING, state);
9999

100-
std::this_thread::sleep_for(milliseconds(110));
100+
std::this_thread::sleep_for(milliseconds(300));
101101
state = root->executeTick();
102102

103103
ASSERT_EQ(NodeStatus::IDLE, action_1.status());
@@ -116,7 +116,7 @@ TEST_F(SwitchTest, Case2)
116116
ASSERT_EQ(NodeStatus::IDLE, action_def.status());
117117
ASSERT_EQ(NodeStatus::RUNNING, state);
118118

119-
std::this_thread::sleep_for(milliseconds(110));
119+
std::this_thread::sleep_for(milliseconds(300));
120120
state = root->executeTick();
121121

122122
ASSERT_EQ(NodeStatus::IDLE, action_1.status());
@@ -135,7 +135,7 @@ TEST_F(SwitchTest, CaseNone)
135135
ASSERT_EQ(NodeStatus::RUNNING, action_def.status());
136136
ASSERT_EQ(NodeStatus::RUNNING, state);
137137

138-
std::this_thread::sleep_for(milliseconds(110));
138+
std::this_thread::sleep_for(milliseconds(300));
139139
state = root->executeTick();
140140

141141
ASSERT_EQ(NodeStatus::IDLE, action_1.status());
@@ -154,7 +154,7 @@ TEST_F(SwitchTest, CaseSwitchToDefault)
154154
ASSERT_EQ(NodeStatus::IDLE, action_def.status());
155155
ASSERT_EQ(NodeStatus::RUNNING, state);
156156

157-
std::this_thread::sleep_for(milliseconds(10));
157+
std::this_thread::sleep_for(milliseconds(20));
158158
state = root->executeTick();
159159
ASSERT_EQ(NodeStatus::RUNNING, action_1.status());
160160
ASSERT_EQ(NodeStatus::IDLE, action_42.status());
@@ -163,22 +163,22 @@ TEST_F(SwitchTest, CaseSwitchToDefault)
163163

164164
// Switch Node does not feels changes. Only when tick.
165165
// (not reactive)
166-
std::this_thread::sleep_for(milliseconds(10));
166+
std::this_thread::sleep_for(milliseconds(20));
167167
bb->set("my_var","");
168-
std::this_thread::sleep_for(milliseconds(10));
168+
std::this_thread::sleep_for(milliseconds(20));
169169
ASSERT_EQ(NodeStatus::RUNNING, action_1.status());
170170
ASSERT_EQ(NodeStatus::IDLE, action_42.status());
171171
ASSERT_EQ(NodeStatus::IDLE, action_def.status());
172172
ASSERT_EQ(NodeStatus::RUNNING, root->status());
173173

174-
std::this_thread::sleep_for(milliseconds(10));
174+
std::this_thread::sleep_for(milliseconds(20));
175175
state = root->executeTick();
176176
ASSERT_EQ(NodeStatus::IDLE, action_1.status());
177177
ASSERT_EQ(NodeStatus::IDLE, action_42.status());
178178
ASSERT_EQ(NodeStatus::RUNNING, action_def.status());
179179
ASSERT_EQ(NodeStatus::RUNNING, state);
180180

181-
std::this_thread::sleep_for(milliseconds(110));
181+
std::this_thread::sleep_for(milliseconds(300));
182182
state = root->executeTick();
183183

184184
ASSERT_EQ(NodeStatus::IDLE, action_1.status());
@@ -198,14 +198,14 @@ TEST_F(SwitchTest, CaseSwitchToAction2)
198198
ASSERT_EQ(NodeStatus::RUNNING, state);
199199

200200
bb->set("my_var","42");
201-
std::this_thread::sleep_for(milliseconds(10));
201+
std::this_thread::sleep_for(milliseconds(20));
202202
state = root->executeTick();
203203
ASSERT_EQ(NodeStatus::IDLE, action_1.status());
204204
ASSERT_EQ(NodeStatus::RUNNING, action_42.status());
205205
ASSERT_EQ(NodeStatus::IDLE, action_def.status());
206206
ASSERT_EQ(NodeStatus::RUNNING, state);
207207

208-
std::this_thread::sleep_for(milliseconds(110));
208+
std::this_thread::sleep_for(milliseconds(300));
209209
state = root->executeTick();
210210

211211
ASSERT_EQ(NodeStatus::IDLE, action_1.status());
@@ -226,7 +226,7 @@ TEST_F(SwitchTest, ActionFailure)
226226
ASSERT_EQ(NodeStatus::IDLE, action_def.status());
227227
ASSERT_EQ(NodeStatus::RUNNING, state);
228228

229-
std::this_thread::sleep_for(milliseconds(110));
229+
std::this_thread::sleep_for(milliseconds(300));
230230
state = root->executeTick();
231231

232232
ASSERT_EQ(NodeStatus::FAILURE, state);

‎tests/gtest_wakeup.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ TEST(WakeUp, BasicTest)
2828
{
2929
staticconstchar* xml_text =R"(
3030
31-
<root>
31+
<root BTCPP_format="4">
3232
<BehaviorTree ID="MainTree">
3333
<FastAction/>
3434
</BehaviorTree>

‎tests/navigation_test.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using namespace BT;
77
// clang-format off
88
staticconstchar* xml_text =R"(
99
10-
<root main_tree_to_execute="BehaviorTree">
10+
<root BTCPP_format="4"main_tree_to_execute="BehaviorTree">
1111
<BehaviorTree ID="BehaviorTree">
1212
<Fallback name="root">
1313

‎tests/trees/child/child/child_child_no_include.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<root main_tree_to_execute ="ChildChildNoInclude">
1+
<rootBTCPP_format="4"main_tree_to_execute ="ChildChildNoInclude">
22
<BehaviorTreeID="ChildChildNoInclude">
33
<AlwaysSuccess />
44
</BehaviorTree>

‎tests/trees/child/child_include_child.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<root main_tree_to_execute ="ChildIncludeChild">
1+
<rootBTCPP_format="4"main_tree_to_execute ="ChildIncludeChild">
22
<includepath="child/child_child_no_include.xml" />
33

44
<BehaviorTreeID="ChildIncludeChild">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp