diff --git a/wpimath/src/test/native/cpp/StateSpaceUtilTest.cpp b/wpimath/src/test/native/cpp/StateSpaceUtilTest.cpp index c1984255cd..3710cffd6c 100644 --- a/wpimath/src/test/native/cpp/StateSpaceUtilTest.cpp +++ b/wpimath/src/test/native/cpp/StateSpaceUtilTest.cpp @@ -114,30 +114,23 @@ TEST(StateSpaceUtilTest, WhiteNoiseVectorArray) { TEST(StateSpaceUtilTest, IsStabilizable) { Eigen::Matrix B{0, 1}; - // We separate the result of IsStabilizable from the assertion because - // templates break gtest. - // First eigenvalue is uncontrollable and unstable. // Second eigenvalue is controllable and stable. - Eigen::Matrix A1{{1.2, 0}, {0, 0.5}}; - bool ret = frc::IsStabilizable<2, 1>(A1, B); - EXPECT_FALSE(ret); + EXPECT_FALSE((frc::IsStabilizable<2, 1>( + Eigen::Matrix{{1.2, 0}, {0, 0.5}}, B))); // First eigenvalue is uncontrollable and marginally stable. // Second eigenvalue is controllable and stable. - Eigen::Matrix A2{{1, 0}, {0, 0.5}}; - ret = frc::IsStabilizable<2, 1>(A2, B); - EXPECT_FALSE(ret); + EXPECT_FALSE((frc::IsStabilizable<2, 1>( + Eigen::Matrix{{1, 0}, {0, 0.5}}, B))); // First eigenvalue is uncontrollable and stable. // Second eigenvalue is controllable and stable. - Eigen::Matrix A3{{0.2, 0}, {0, 0.5}}; - ret = frc::IsStabilizable<2, 1>(A3, B); - EXPECT_TRUE(ret); + EXPECT_TRUE((frc::IsStabilizable<2, 1>( + Eigen::Matrix{{0.2, 0}, {0, 0.5}}, B))); // First eigenvalue is uncontrollable and stable. // Second eigenvalue is controllable and unstable. - Eigen::Matrix A4{{0.2, 0}, {0, 1.2}}; - ret = frc::IsStabilizable<2, 1>(A4, B); - EXPECT_TRUE(ret); + EXPECT_TRUE((frc::IsStabilizable<2, 1>( + Eigen::Matrix{{0.2, 0}, {0, 1.2}}, B))); }