37 #include <gtest/gtest.h>
58 GTEST_TEST(ConfigurationFailureTest, ConfirmFormatting) {
61 const Boxd box(1, 2, 3);
63 const GJKSolver_libccd<double> solver;
64 const std::logic_error e(
"dummy message");
68 }
catch (
const std::logic_error& e) {
70 std::regex_search(e.what(), std::regex(
"[^]+dummy message[^]+")));
73 std::regex ordered_shapes_re(
"[^]+Sphere<double>[^]+Box<double>[^]+");
74 EXPECT_TRUE(std::regex_search(e.what(), ordered_shapes_re)) << e.what();
78 std::regex matrices_re(
79 "[^]+X_FS1[^]+, 12,[^]+, 13,[^]+, 14,[^]+, 1;"
80 "[^]+X_FS2[^]+, 17,[^]+, 18,[^]+, 19,[^]+, 1;");
81 EXPECT_TRUE(std::regex_search(e.what(), matrices_re)) << e.what();
90 int main(
int argc,
char* argv[]) {
91 ::testing::InitGoogleTest(&argc, argv);
92 return RUN_ALL_TESTS();