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
3e70d4cd
Commit
3e70d4cd
authored
1 year ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup test, less print, some asserts
parent
76a2737d
No related branches found
No related tags found
3 merge requests
!476
spdlog version upgrade
,
!472
Merge ProcessorLandmarkExternal
,
!468
Resolve "multiple processors per sensor"
Pipeline
#16658
failed
1 year ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/gtest_processor_tracker_two_processors_one_sensor.cpp
+16
-14
16 additions, 14 deletions
test/gtest_processor_tracker_two_processors_one_sensor.cpp
with
16 additions
and
14 deletions
test/gtest_processor_tracker_two_processors_one_sensor.cpp
+
16
−
14
View file @
3e70d4cd
...
@@ -134,41 +134,40 @@ TEST_F(ProcessorTrackerFeatureDummyDoubledTest, process_once_one_prc_then_other)
...
@@ -134,41 +134,40 @@ TEST_F(ProcessorTrackerFeatureDummyDoubledTest, process_once_one_prc_then_other)
// Process by one processor
// Process by one processor
processor_1
->
captureCallback
(
capture
);
processor_1
->
captureCallback
(
capture
);
problem
->
print
(
4
,
1
,
1
,
1
);
auto
frame_1
=
capture
->
getFrame
();
auto
frame_1
=
capture
->
getFrame
();
// Process by the other processor
// Process by the other processor
processor_2
->
captureCallback
(
capture
);
processor_2
->
captureCallback
(
capture
);
problem
->
print
(
4
,
1
,
1
,
1
);
auto
frame_2
=
capture
->
getFrame
();
auto
frame_2
=
capture
->
getFrame
();
problem
->
print
(
4
,
1
,
1
,
1
);
ASSERT_EQ
(
problem
->
getTrajectory
()
->
getFrameMap
().
size
(),
1
);
ASSERT_EQ
(
frame_1
,
frame_2
);
ASSERT_EQ
(
frame_1
,
frame_2
);
}
}
TEST_F
(
ProcessorTrackerFeatureDummyDoubledTest
,
process_once
)
TEST_F
(
ProcessorTrackerFeatureDummyDoubledTest
,
process_once
)
{
{
// Create a capture
CaptureBasePtr
capture
=
std
::
make_shared
<
CaptureVoid
>
(
0
,
sensor
);
// Process by both processors automatically in sequence
// Process by both processors automatically in sequence
CaptureBasePtr
capture
=
std
::
make_shared
<
CaptureVoid
>
(
0
,
sensor
);
capture
->
process
();
capture
->
process
();
problem
->
print
(
4
,
1
,
1
,
1
);
problem
->
print
(
4
,
1
,
1
,
1
);
ASSERT_EQ
(
problem
->
getTrajectory
()
->
getFrameMap
().
size
(),
1
);
}
}
TEST_F
(
ProcessorTrackerFeatureDummyDoubledTest
,
process_twice
)
TEST_F
(
ProcessorTrackerFeatureDummyDoubledTest
,
process_twice
)
{
{
// Create a capture
CaptureBasePtr
capture
=
std
::
make_shared
<
CaptureVoid
>
(
0
,
sensor
);
// Process by both processors automatically in sequence
// Process by both processors automatically in sequence
CaptureBasePtr
capture
=
std
::
make_shared
<
CaptureVoid
>
(
0
,
sensor
);
capture
->
process
();
capture
->
process
();
problem
->
print
(
4
,
1
,
1
,
1
);
capture
=
std
::
make_shared
<
CaptureVoid
>
(
1
,
sensor
);
capture
=
std
::
make_shared
<
CaptureVoid
>
(
1
,
sensor
);
capture
->
process
();
capture
->
process
();
problem
->
print
(
4
,
1
,
1
,
1
);
problem
->
print
(
4
,
1
,
1
,
1
);
}
}
TEST_F
(
ProcessorTrackerFeatureDummyDoubledTest
,
process_thrice
)
TEST_F
(
ProcessorTrackerFeatureDummyDoubledTest
,
process_thrice
)
...
@@ -178,16 +177,14 @@ TEST_F(ProcessorTrackerFeatureDummyDoubledTest, process_thrice)
...
@@ -178,16 +177,14 @@ TEST_F(ProcessorTrackerFeatureDummyDoubledTest, process_thrice)
// Process by both processors automatically in sequence
// Process by both processors automatically in sequence
capture
->
process
();
capture
->
process
();
problem
->
print
(
4
,
1
,
1
,
1
);
capture
=
std
::
make_shared
<
CaptureVoid
>
(
1
,
sensor
);
capture
=
std
::
make_shared
<
CaptureVoid
>
(
1
,
sensor
);
capture
->
process
();
capture
->
process
();
problem
->
print
(
4
,
1
,
1
,
1
);
capture
=
std
::
make_shared
<
CaptureVoid
>
(
2
,
sensor
);
capture
=
std
::
make_shared
<
CaptureVoid
>
(
2
,
sensor
);
capture
->
process
();
capture
->
process
();
problem
->
print
(
4
,
1
,
1
,
1
);
problem
->
print
(
2
,
1
,
1
,
1
);
}
}
TEST_F
(
ProcessorTrackerFeatureDummyDoubledTest
,
process_loop
)
TEST_F
(
ProcessorTrackerFeatureDummyDoubledTest
,
process_loop
)
...
@@ -196,7 +193,12 @@ TEST_F(ProcessorTrackerFeatureDummyDoubledTest, process_loop)
...
@@ -196,7 +193,12 @@ TEST_F(ProcessorTrackerFeatureDummyDoubledTest, process_loop)
{
{
auto
capture
=
std
::
make_shared
<
CaptureVoid
>
(
t
,
sensor
);
auto
capture
=
std
::
make_shared
<
CaptureVoid
>
(
t
,
sensor
);
capture
->
process
();
capture
->
process
();
problem
->
print
(
2
,
1
,
1
,
1
);
}
}
problem
->
print
(
2
,
1
,
1
,
1
);
}
}
int
main
(
int
argc
,
char
**
argv
)
{
testing
::
InitGoogleTest
(
&
argc
,
argv
);
return
RUN_ALL_TESTS
();
}
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