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
2fc9d621
Commit
2fc9d621
authored
8 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Define WOLF ROOT also for tests
parent
b28f7255
No related branches found
No related tags found
1 merge request
!104
Ctest configuration
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/CMakeLists.txt
+5
-2
5 additions, 2 deletions
src/CMakeLists.txt
src/test/gtest_frame_base.cpp
+68
-0
68 additions, 0 deletions
src/test/gtest_frame_base.cpp
with
73 additions
and
2 deletions
src/CMakeLists.txt
+
5
−
2
View file @
2fc9d621
...
...
@@ -21,9 +21,12 @@ option(BUILD_EXAMPLES "Build examples" ON)
# Does this has any other interest
# but for the examples ?
#IF(BUILD_EXAMPLES)
IF
(
BUILD_EXAMPLES
)
set
(
_WOLF_ROOT_DIR
${
CMAKE_SOURCE_DIR
}
)
ENDIF
(
BUILD_EXAMPLES
)
IF
(
BUILD_TESTS
)
set
(
_WOLF_ROOT_DIR
${
CMAKE_SOURCE_DIR
}
)
#
ENDIF(BUILD_
EXAMPLE
S)
ENDIF
(
BUILD_
TEST
S
)
#find dependencies.
...
...
This diff is collapsed.
Click to expand it.
src/test/gtest_frame_base.cpp
0 → 100644
+
68
−
0
View file @
2fc9d621
/*
* gtest_frame_base.cpp
*
* Created on: Nov 15, 2016
* Author: jsola
*/
#include
"utils_gtest.h"
#include
"../logging.h"
#include
"../frame_base.h"
#include
"../sensor_odom_2D.h"
#include
<iostream>
using
namespace
Eigen
;
using
namespace
std
;
using
namespace
wolf
;
TEST
(
FrameBase
,
GettersAndSetters
)
{
FrameBasePtr
f
=
make_shared
<
FrameBase
>
(
1
,
make_shared
<
StateBlock
>
(
2
),
make_shared
<
StateBlock
>
(
1
));
// getters
ASSERT_EQ
(
f
->
id
(),
1
);
ASSERT_EQ
(
f
->
getTimeStamp
(),
1
);
TimeStamp
t
;
f
->
getTimeStamp
(
t
);
ASSERT_EQ
(
t
,
1
);
ASSERT_EQ
(
f
->
getPPtr
()
->
getVector
().
size
(),
2
);
ASSERT_EQ
(
f
->
getOPtr
()
->
getVector
().
size
(),
1
);
ASSERT_EQ
(
f
->
getVPtr
(),
nullptr
);
ASSERT_EQ
(
f
->
isFixed
(),
false
);
ASSERT_EQ
(
f
->
isKey
(),
false
);
ASSERT_EQ
(
f
->
getStateBlockVec
().
size
(),
3
);
ASSERT_FALSE
(
f
->
getTrajectoryPtr
());
ASSERT_FALSE
(
f
->
getProblem
());
// ASSERT_THROW(f->getPreviousFrame(), std::runtime_error); // protected by assert()
// ASSERT_EQ(f->getStatus(), ST_ESTIMATED); // protected
ASSERT_FALSE
(
f
->
getCaptureOf
(
make_shared
<
SensorOdom2D
>
(
nullptr
,
nullptr
,
1
,
1
)));
ASSERT_TRUE
(
f
->
getCaptureList
().
empty
());
ASSERT_TRUE
(
f
->
getConstrainedByList
().
empty
());
}
TEST
(
FrameBase
,
TimeStamp
)
{
}
TEST
(
FrameBase
,
LinksToTree
)
{
}
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