Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
1d1ced2f
Commit
1d1ced2f
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Improve tests
parent
8c8b4dff
No related branches found
No related tags found
1 merge request
!341
Resolve "HasStateBlocks::addStateBlock() needs to register SB's"
Pipeline
#4976
passed
5 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/frame/frame_base.cpp
+1
-1
1 addition, 1 deletion
src/frame/frame_base.cpp
test/gtest_has_state_blocks.cpp
+13
-4
13 additions, 4 deletions
test/gtest_has_state_blocks.cpp
with
14 additions
and
5 deletions
src/frame/frame_base.cpp
+
1
−
1
View file @
1d1ced2f
...
...
@@ -321,7 +321,7 @@ void FrameBase::setProblem(ProblemPtr _problem)
NodeBase
::
setProblem
(
_problem
);
if
(
this
->
isKey
())
registerNewStateBlocks
(
getP
roblem
()
);
registerNewStateBlocks
(
_p
roblem
);
for
(
auto
cap
:
capture_list_
)
cap
->
setProblem
(
_problem
);
...
...
This diff is collapsed.
Click to expand it.
test/gtest_has_state_blocks.cpp
+
13
−
4
View file @
1d1ced2f
...
...
@@ -50,7 +50,7 @@ class HasStateBlocksTest : public testing::Test
};
TEST_F
(
HasStateBlocksTest
,
Notifications_setKey
)
TEST_F
(
HasStateBlocksTest
,
Notifications_setKey
_add
)
{
Notification
n
;
ASSERT_FALSE
(
problem
->
getStateBlockNotification
(
sbp0
,
n
));
...
...
@@ -65,7 +65,7 @@ TEST_F(HasStateBlocksTest, Notifications_setKey)
ASSERT_EQ
(
n
,
ADD
);
}
TEST_F
(
HasStateBlocksTest
,
Notifications_add
StateBlock
)
TEST_F
(
HasStateBlocksTest
,
Notifications_add
_makeKF
)
{
Notification
n
;
...
...
@@ -91,15 +91,24 @@ TEST_F(HasStateBlocksTest, Notifications_addStateBlock)
ASSERT_TRUE
(
problem
->
getStateBlockNotification
(
sbv0
,
n
));
ASSERT_EQ
(
n
,
ADD
);
}
TEST_F
(
HasStateBlocksTest
,
Notifications_makeKF_add
)
{
Notification
n
;
// first make KF, then add SB
F1
->
link
(
problem
->
getTrajectory
());
F1
->
setKey
();
F1
->
addStateBlock
(
"P"
,
sbp1
);
F1
->
setKey
();
ASSERT_TRUE
(
problem
->
getStateBlockNotification
(
sbp1
,
n
));
ASSERT_EQ
(
n
,
ADD
);
// add another SB
ASSERT_FALSE
(
problem
->
getStateBlockNotification
(
sbv1
,
n
));
F1
->
addStateBlock
(
"V"
,
sbv1
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment