Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit495648e

Browse files
authored
Merge pull request#602 from OSVR/update-tests
Update tests: port all to Catch2 2.8.0, removing old gtest
2 parents297fa11 +59cf1d0 commit495648e

File tree

241 files changed

+16912
-153206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+16912
-153206
lines changed

‎CMakeLists.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ use_folders()
178178
include(PlatformDefinitions)
179179
define_platform_macros(OSVR)
180180

181-
include(osvrGtest)
182-
183181
# Modules that get shipped with an installed SDK
184182
include(osvrAddPlugin)
185183
include(osvrConvertJson)

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ This project: Licensed under the Apache License, Version 2.0.
2525
Some directories under`/vendor` are in fact not external libraries vendored-in, but "internally-vendored" - developed as a part of OSVR-Core, and likewise licensed under the Apache License 2.0, but are logically distinct from the Core in their functionality and are thus kept separate in anticipation of potential splitting off into a separate project at some future point. These include`/vendor/comutils` and`/vendor/dummy-sal`.
2626

2727
-`/cmake` - Git subtree from<https://github.com/rpavlik/cmake-modules> used at compile-time only. Primarily BSL 1.0, some items under the license used by CMake (BSD-style)
28+
-`/vendor/catch-single-header-2.8.0` - Header downloaded from<https://github.com/catchorg/Catch2/releases/download/v2.8.0/catch.hpp> - BSL 1.0 license. Used only for building/running tests.
2829
-`/vendor/com_smart_pointer` - Header (for integrating`boost::intrusive_ptr` with MS COM) extracted from the following project and file:<https://github.com/rengeln/nyx/blob/master/src/Prefix.h>, modified as needed for compatibility. MIT license.
2930
-`/vendor/discount-windows-bins` - Submodule containing source, build script, and Windows binaries for the "Discount" Markdown processor, used only during the build process on Windows. Upstream at<https://github.com/Orc/discount>. 3-clause BSD license.
3031
-`/vendor/eigen` - Unpacked release from<http://eigen.tuxfamily.org/> - header-only library under the MPL2 (a file-level copyleft, compatible with proprietary software), define`EIGEN_MPL2_ONLY` to exclude modules with other license from the build (done in OSVR-Core build system).
3132
-`/vendor/FloatExceptions` - Modified code ([original author: Bruce Dawson](http://randomascii.wordpress.com/2012/04/21/exceptional-floating-point/) for development use only, usage should not be committed or merged into master. MIT licensed.
3233
-`/vendor/folly` - Submodule of[C++11 components originally developed and widely used at Facebook](https://github.com/facebook/folly). Apache License, Version 2.0.
33-
-`/vendor/gtest-1.7.0` - Unpacked source from<https://code.google.com/p/googletest/> - 3-clause BSD license. Used only for building/running tests.
3434
-`/vendor/jenkins-ctest-plugin` - Git submodule from<https://github.com/rpavlik/jenkins-ctest-plugin>, used only for building/running tests and CI. MIT license.
3535
-`/vendor/libcxx-backports` - C++11/14 standard library functionality backported into headers using the implementations from the libc++ project at<http://libcxx.llvm.org/>. Dual licensed under[the MIT and the "BSD-like" UIUC license](http://llvm.org/docs/DeveloperPolicy.html#license).
3636
-`/vendor/UIforETWbins` - Distributed binary releases of UIforETW<https://github.com/google/UIforETW> extracted to a Git repo (submodule) unmodified. Apache License, Version 2.0.

‎cmake-local/osvrGtest.cmake‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎plugins/unifiedvideoinertialtracker/CMakeLists.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@ if(BUILD_TESTING)
123123
TestIMU_Common.h
124124
TestIMU_EKF.cpp
125125
TestIMU_UKF.cpp)
126-
target_link_libraries(uvbi-test-imuPRIVATE uvbi-corevendored-catch)
126+
target_link_libraries(uvbi-test-imuPRIVATE uvbi-coreosvr-catch2-interface)
127127
set_target_properties(uvbi-test-imu PROPERTIES
128128
FOLDER"${PROJ_FOLDER}")
129+
add_test(NAME TestIMUCOMMAND uvbi-test-imu)
129130
endif()
130131

131132
# "object library" for the HDK data files.

‎plugins/unifiedvideoinertialtracker/TestIMU.h‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@
2929
/// messages.
3030
#defineCATCH_CONFIG_CONSOLE_WIDTH 120
3131

32-
// Internal Includes
33-
#include"catch_typelist.h"// internally-developed extension to Catch.
34-
35-
// Library/third-party includes
36-
#include<catch.hpp>
37-
38-
// Standard includes
39-
// - none
32+
#include<catch2/catch.hpp>
4033

4134
#endif// INCLUDED_TestIMU_h_GUID_955733BE_EFEE_4C8E_6D9B_F1A8FDBC8F6C

‎plugins/unifiedvideoinertialtracker/TestIMU_Common.h‎

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
// Copyright 2016 Sensics, Inc.
12+
// Copyright 2019 Collabora, Ltd.
1213
//
1314
// Licensed under the Apache License, Version 2.0 (the "License");
1415
// you may not use this file except in compliance with the License.
@@ -30,7 +31,6 @@
3031

3132
#include"ConfigParams.h"
3233
#include"IMUStateMeasurements.h"
33-
#include"IMUStateMeasurements.h"
3434

3535
// Library/third-party includes
3636
#include<osvr/Util/Angles.h>
@@ -94,18 +94,6 @@ inline std::ostream &operator<<(std::ostream &os, Quaterniond const &q) {
9494
}
9595
}// namespace Eigen
9696

97-
namespaceCatch {
98-
template<>structTypelistTypeNameTrait<kalman::QFirst> {
99-
staticconstchar *get() {return"kalman::QFirst"; }
100-
};
101-
template<>structTypelistTypeNameTrait<kalman::QLast> {
102-
staticconstchar *get() {return"kalman::QLast"; }
103-
};
104-
template<>structTypelistTypeNameTrait<kalman::SplitQ> {
105-
staticconstchar *get() {return"kalman::SplitQ"; }
106-
};
107-
}// namespace Catch
108-
10997
staticconstdouble SMALL_VALUE =0.1;
11098

11199
template<typename MeasurementType,typename InProgressType>
@@ -152,8 +140,7 @@ inline void commonSmallPositiveYChecks(TestData *data,
152140
AND_THEN("state correction should not contain any translational/linear"
153141
"velocity components") {
154142
REQUIRE(inProgress.stateCorrection.templatehead<3>().isZero());
155-
REQUIRE(
156-
inProgress.stateCorrection.templatesegment<3>(6).isZero());
143+
REQUIRE(inProgress.stateCorrection.templatesegment<3>(6).isZero());
157144
}
158145
AND_WHEN("the correction is applied") {
159146
auto errorCovarianceCorrectionWasFinite = inProgress.finishCorrection();

‎plugins/unifiedvideoinertialtracker/TestIMU_EKF.cpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
// Copyright 2016 Sensics, Inc.
12+
// Copyright 2019 Collabora, Ltd.
1213
//
1314
// Licensed under the Apache License, Version 2.0 (the "License");
1415
// you may not use this file except in compliance with the License.
@@ -33,13 +34,12 @@
3334

3435
#if0
3536
/// Turns out that QFirst and QLast are likely wrong.
36-
CATCH_TYPELIST_DESCRIBED_TESTCASE("identity calibration output", "[.][ekf]", kalman::QFirst,
37+
TEMPLATE_TEST_CASE("identity calibration output", "[.][ekf]", kalman::QFirst,
3738
kalman::QLast, kalman::SplitQ) {
3839
#endif
39-
CATCH_TYPELIST_DESCRIBED_TESTCASE("identity calibration output","[.][ekf]",
40-
kalman::SplitQ,
41-
kalman::QLastWithSplitInnovation) {
42-
using MeasurementType = OrientationMeasurementUsingPolicy<TypeParam>;
40+
TEMPLATE_TEST_CASE("identity calibration output","[.][ekf]", kalman::SplitQ,
41+
kalman::QLastWithSplitInnovation) {
42+
using MeasurementType = OrientationMeasurementUsingPolicy<TestType>;
4343
using JacobianType =typename MeasurementType::JacobianType;
4444
unique_ptr<TestData>data(new TestData);
4545
GIVEN("an identity state") {

‎plugins/unifiedvideoinertialtracker/TestIMU_UKF.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
// Copyright 2016 Sensics, Inc.
12+
// Copyright 2019 Collabora, Ltd.
1213
//
1314
// Licensed under the Apache License, Version 2.0 (the "License");
1415
// you may not use this file except in compliance with the License.

‎plugins/unifiedvideoinertialtracker/catch_typelist.h‎

Lines changed: 0 additions & 92 deletions
This file was deleted.

‎plugins/videobasedtracker/CMakeLists.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ if(BUILD_TESTING)
168168
vbtracker-core)
169169
set_target_properties(vbtracker-cam PROPERTIES
170170
FOLDER"OSVR Plugins/Video-Based Tracker")
171-
#osvr_setup_gtest(vbtracker-cam)
172171

173172
if(WIN32)
174173
target_link_libraries(vbtracker-camPRIVATE directshow-camera)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp