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
618d2158
Commit
618d2158
authored
1 month ago
by
cont-integration
Browse files
Options
Downloads
Patches
Plain Diff
[skip ci] applied clang format
parent
1b3a1fb5
No related branches found
No related tags found
1 merge request
!448
Draft: Resolve "Implementation of new nodes creation"
Pipeline
#21491
skipped
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/utils/utils_gtest.h
+4
-4
4 additions, 4 deletions
include/core/utils/utils_gtest.h
test/gtest_example.cpp
+2
-3
2 additions, 3 deletions
test/gtest_example.cpp
with
6 additions
and
7 deletions
include/core/utils/utils_gtest.h
+
4
−
4
View file @
618d2158
...
@@ -145,7 +145,7 @@ TEST(Test, Foo)
...
@@ -145,7 +145,7 @@ TEST(Test, Foo)
return Eigen::Quaterniond(Eigen::Vector4d(lhs)) \
return Eigen::Quaterniond(Eigen::Vector4d(lhs)) \
.angularDistance(Eigen::Quaterniond(Eigen::Vector4d(rhs))) < precision; \
.angularDistance(Eigen::Quaterniond(Eigen::Vector4d(rhs))) < precision; \
}, \
}, \
Eigen::Quaterniond(C_expect).coeffs(),
\
Eigen::Quaterniond(C_expect).coeffs(), \
Eigen::Quaterniond(C_actual).coeffs());
Eigen::Quaterniond(C_actual).coeffs());
#define ASSERT_QUATERNION_APPROX(C_expect, C_actual, precision) \
#define ASSERT_QUATERNION_APPROX(C_expect, C_actual, precision) \
...
@@ -154,7 +154,7 @@ TEST(Test, Foo)
...
@@ -154,7 +154,7 @@ TEST(Test, Foo)
return Eigen::Quaterniond(Eigen::Vector4d(lhs)) \
return Eigen::Quaterniond(Eigen::Vector4d(lhs)) \
.angularDistance(Eigen::Quaterniond(Eigen::Vector4d(rhs))) < precision; \
.angularDistance(Eigen::Quaterniond(Eigen::Vector4d(rhs))) < precision; \
}, \
}, \
Eigen::Quaterniond(C_expect).coeffs(),
\
Eigen::Quaterniond(C_expect).coeffs(), \
Eigen::Quaterniond(C_actual).coeffs());
Eigen::Quaterniond(C_actual).coeffs());
#define EXPECT_QUATERNION_VECTOR_APPROX(C_expect, C_actual, precision) \
#define EXPECT_QUATERNION_VECTOR_APPROX(C_expect, C_actual, precision) \
...
@@ -180,7 +180,7 @@ TEST(Test, Foo)
...
@@ -180,7 +180,7 @@ TEST(Test, Foo)
[](const Eigen::VectorXd lhs, const Eigen::VectorXd rhs) { \
[](const Eigen::VectorXd lhs, const Eigen::VectorXd rhs) { \
assert(lhs.size() == 3 and rhs.size() == 3); \
assert(lhs.size() == 3 and rhs.size() == 3); \
Eigen::VectorXd er = lhs - rhs; \
Eigen::VectorXd er = lhs - rhs; \
er(2) = remainder((double)er(2), 2 * M_PI);
\
er(2) = remainder((double)er(2), 2 * M_PI); \
return er.isMuchSmallerThan(1, precision); \
return er.isMuchSmallerThan(1, precision); \
}, \
}, \
C_expect, \
C_expect, \
...
@@ -191,7 +191,7 @@ TEST(Test, Foo)
...
@@ -191,7 +191,7 @@ TEST(Test, Foo)
[](const Eigen::VectorXd lhs, const Eigen::VectorXd rhs) { \
[](const Eigen::VectorXd lhs, const Eigen::VectorXd rhs) { \
assert(lhs.size() == 3 and rhs.size() == 3); \
assert(lhs.size() == 3 and rhs.size() == 3); \
Eigen::VectorXd er = lhs - rhs; \
Eigen::VectorXd er = lhs - rhs; \
er(2) = remainder((double)er(2), 2 * M_PI);
\
er(2) = remainder((double)er(2), 2 * M_PI); \
return er.isMuchSmallerThan(1, precision); \
return er.isMuchSmallerThan(1, precision); \
}, \
}, \
C_expect, \
C_expect, \
...
...
This diff is collapsed.
Click to expand it.
test/gtest_example.cpp
+
2
−
3
View file @
618d2158
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
#include
"core/utils/utils_gtest.h"
#include
"core/utils/utils_gtest.h"
#include
"core/common/wolf.h"
#include
"core/common/wolf.h"
int
global_param
=
1
;
int
global_param
=
1
;
double
eps
=
1e-6
;
double
eps
=
1e-6
;
class
ExampleTest
:
public
testing
::
Test
class
ExampleTest
:
public
testing
::
Test
{
{
...
@@ -75,7 +75,6 @@ TEST(TestTest, test_example)
...
@@ -75,7 +75,6 @@ TEST(TestTest, test_example)
global_param
+=
2
;
global_param
+=
2
;
}
}
TEST
(
TestTest
,
test_example2
)
TEST
(
TestTest
,
test_example2
)
{
{
// The global variables can be used in any test, but they are not reset between tests.
// The global variables can be used in any test, but they are not reset between 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