Skip to content

Commit 8b68066

Browse files
committed
Update test construction
1 parent d362e3c commit 8b68066

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/unit/math/mix/prob/gaussian_copula_cholesky_test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ TEST_F(AgradRev, ProbDistributionsGaussCopulaCholesky) {
44
// Bind functors for compatibility with AD framework
55
auto f = [](const auto func1, const auto func2) {
66
return [=](const auto& y, const auto& args, const auto& sigma) {
7-
auto lcdf_functors = std::make_tuple(std::make_tuple(func1, args[0]),
8-
std::make_tuple(func2, args[1]));
7+
auto lcdf_functors = std::make_tuple(std::make_tuple(func1, args[0], args[1]),
8+
std::make_tuple(func2));
99
auto sigma_sym = stan::math::multiply(0.5, sigma + sigma.transpose());
1010
auto L = stan::math::cholesky_decompose(sigma_sym);
1111
return stan::math::gaussian_copula_cholesky_lpdf(y, lcdf_functors, L);
@@ -17,15 +17,15 @@ TEST_F(AgradRev, ProbDistributionsGaussCopulaCholesky) {
1717
Eigen::VectorXd y1(2);
1818
y1 << 1.0, 0.1;
1919
Eigen::VectorXd args(2);
20-
args << 0, 2.0;
20+
args << 2, 1;
2121

22-
auto func1 = [](const auto& y, const auto& mu) {
23-
return stan::math::normal_lcdf(y, mu, 1.0);
22+
auto func1 = [](const auto& y, const auto& shape, const auto& scale) {
23+
return stan::math::gamma_lcdf(y, shape, scale);
2424
};
2525
auto func2 = [](const auto& y) { return stan::math::std_normal_lcdf(y); };
2626

2727
Eigen::MatrixXd Sigma22(2, 2);
2828
Sigma22 << 2.0, 0.5, 0.5, 1.1;
2929

30-
stan::test::expect_ad(f(func2, func2), y1, args, Sigma22);
30+
stan::test::expect_ad(f(func1, func2), y1, args, Sigma22);
3131
}

0 commit comments

Comments
 (0)