Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d1cfa1

Browse files
author
Davide Faconti
committed
fix unit test
1 parent 0b626f4 commit 7d1cfa1

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

gtest/gtest_decorator.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@ struct DeadlineTest : testing::Test
3535
struct RepeatTest : testing::Test
3636
{
3737
BT::RepeatNode root;
38-
BT::AsyncActionTest action;
38+
BT::SyncActionTest action;
3939

4040
RepeatTest() : root("repeat", 3), action("action")
4141
{
4242
root.setChild(&action);
43-
action.setTime(0);
4443
}
4544
~RepeatTest()
4645
{
@@ -51,12 +50,11 @@ struct RepeatTest : testing::Test
5150
struct RetryTest : testing::Test
5251
{
5352
BT::RetryNode root;
54-
BT::AsyncActionTest action;
53+
BT::SyncActionTest action;
5554

5655
RetryTest() : root("retry", 3), action("action")
5756
{
5857
root.setChild(&action);
59-
action.setTime(0);
6058
}
6159
~RetryTest()
6260
{

gtest/include/action_test_node.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ class SyncActionTest : public ActionNodeBase
2323
return tick_count_;
2424
}
2525

26+
void resetTicks()
27+
{
28+
tick_count_ = 0;
29+
}
30+
2631
private:
2732
bool boolean_value_;
2833
int tick_count_;

0 commit comments

Comments
 (0)