Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Jul 25, 2023
1 parent d29f5f9 commit f5c71b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/math/prim/fun/stan_print_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ TEST(MathPrim, basic_print) {

std::tuple<Eigen::VectorXd, int, std::vector<double>> tup(v, i, a);

std::vector<std::tuple<Eigen::VectorXd, int, std::vector<double>>> arr_tup{
tup, tup};

{
std::stringstream s;
stan::math::stan_print(&s, i);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f5c71b3

Please sign in to comment.