From 2e988bec2ecd2aea433cb511e9fe9efe65aa2c81 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Mon, 15 Feb 2021 13:45:32 -0500 Subject: [PATCH] more explicit template args for win --- tests/include/igl/min_quad_with_fixed.cpp | 3 ++- tests/include/igl/quadprog.cpp | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/tests/include/igl/min_quad_with_fixed.cpp b/tests/include/igl/min_quad_with_fixed.cpp index 397fcb783..512d0865e 100644 --- a/tests/include/igl/min_quad_with_fixed.cpp +++ b/tests/include/igl/min_quad_with_fixed.cpp @@ -10,7 +10,8 @@ TEST_CASE("min_quad_with_fixed: dense", "[igl]" ) const Eigen::Matrix b = (Eigen::Matrix(1,1)<<2).finished(); const Eigen::Array k = (Eigen::Array()< bc = (Eigen::Matrix(3,1)<<1,0,0).finished(); - const Eigen::Matrix x = igl::min_quad_with_fixed(H,f,k,bc,A,b); + // Windows needs template args spelled out + const Eigen::Matrix x = igl::min_quad_with_fixed(H,f,k,bc,A,b); REQUIRE(abs(x(0)- 1.0)()); REQUIRE(abs(x(1)- 1.5)()); REQUIRE(abs(x(2)- -.5)()); diff --git a/tests/include/igl/quadprog.cpp b/tests/include/igl/quadprog.cpp index 1a0854414..91b5e7d4c 100644 --- a/tests/include/igl/quadprog.cpp +++ b/tests/include/igl/quadprog.cpp @@ -26,7 +26,8 @@ TEST_CASE("quadprog: box3", "[igl]" ) 1, 1 ).finished(); - Eigen::Vector3d x = igl::quadprog(H,f,lb,ub); + // Windows needs template args spelled out + Eigen::Vector3d x = igl::quadprog(H,f,lb,ub); //std::cout<(H,f,lb,ub); REQUIRE(x(0)==0.0); REQUIRE(x(1)==0.5); REQUIRE(x(1)==0.5); @@ -64,7 +66,8 @@ TEST_CASE("quadprog: box3", "[igl]" ) 0.015625, 0.015625 ).finished(); - Eigen::Vector3d x = igl::quadprog(H,f,lb,ub); + // Windows needs template args spelled out + Eigen::Vector3d x = igl::quadprog(H,f,lb,ub); Eigen::Vector3d xexact(0.015625, 0.013732474124087, 0.0110593284260843); REQUIRE((x-xexact).array().abs().maxCoeff() < 1e-4); } @@ -89,8 +92,8 @@ TEST_CASE("quadprog: box2", "[igl]" ) 1, 1 ).finished(); - - Eigen::Vector2d x = igl::quadprog(H,f,lb,ub); + // Windows needs template args spelled out + Eigen::Vector2d x = igl::quadprog(H,f,lb,ub); //std::cout<(H,f,lb,ub); //std::cout<(H,f,lb,ub); //std::cout<