From f5c71b3d5f3a10c7cbe8b9b947a1e4dfdcfc637e Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Tue, 25 Jul 2023 11:36:50 -0400 Subject: [PATCH] Add test --- test/unit/math/prim/fun/stan_print_test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/unit/math/prim/fun/stan_print_test.cpp b/test/unit/math/prim/fun/stan_print_test.cpp index f7b6fcee487..53cb6ec4cb4 100644 --- a/test/unit/math/prim/fun/stan_print_test.cpp +++ b/test/unit/math/prim/fun/stan_print_test.cpp @@ -11,6 +11,9 @@ TEST(MathPrim, basic_print) { std::tuple> tup(v, i, a); + std::vector>> arr_tup{ + tup, tup}; + { std::stringstream s; stan::math::stan_print(&s, i); @@ -52,6 +55,11 @@ TEST(MathPrim, basic_print) { stan::math::stan_print(&s, tup); EXPECT_TRUE(s.str().find("([1],1,[1])") != std::string::npos); } + { + std::stringstream s; + stan::math::stan_print(&s, arr_tup); + EXPECT_TRUE(s.str().find("[([1],1,[1])") != std::string::npos); + } } TEST(MathPrim, basic_expressions) {