mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Port Ceres to Windows
This is a preliminary, but full, port of Ceres to Windows. Currently all tests compile and run, with only system_test failing to work correctly due to a path issue. Change-Id: I4152c1588bf51ffd7f4d9401ef9759f5d28c299c
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
// TODO(keir): Figure out how to enable the death tests on Windows.
|
||||
|
||||
TEST(ParameterBlock, SetLocalParameterization) {
|
||||
double x[3] = { 1.0, 2.0, 3.0 };
|
||||
ParameterBlock parameter_block(x, 3);
|
||||
@@ -46,11 +48,13 @@ TEST(ParameterBlock, SetLocalParameterization) {
|
||||
|
||||
// Can't set the parameterization if the sizes don't match.
|
||||
SubsetParameterization subset_wrong_size(4, indices);
|
||||
#ifndef _WIN32
|
||||
ASSERT_DEATH(parameter_block.SetParameterization(&subset_wrong_size),
|
||||
"global");
|
||||
|
||||
// Can't set parameterization to NULL from NULL.
|
||||
ASSERT_DEATH(parameter_block.SetParameterization(NULL), "NULL");
|
||||
#endif // _WIN32
|
||||
|
||||
// Now set the parameterization.
|
||||
SubsetParameterization subset(3, indices);
|
||||
@@ -59,6 +63,7 @@ TEST(ParameterBlock, SetLocalParameterization) {
|
||||
// Re-setting the parameterization to the same value is supported.
|
||||
parameter_block.SetParameterization(&subset);
|
||||
|
||||
#ifndef _WIN32
|
||||
// Can't set parameterization to NULL from another parameterization.
|
||||
ASSERT_DEATH(parameter_block.SetParameterization(NULL), "NULL");
|
||||
|
||||
@@ -66,6 +71,7 @@ TEST(ParameterBlock, SetLocalParameterization) {
|
||||
SubsetParameterization subset_different(3, indices);
|
||||
ASSERT_DEATH(parameter_block.SetParameterization(&subset_different),
|
||||
"re-set");
|
||||
#endif // _WIN32
|
||||
|
||||
// Ensure the local parameterization jacobian result is correctly computed.
|
||||
ConstMatrixRef local_parameterization_jacobian(
|
||||
|
||||
Reference in New Issue
Block a user