11#include < stan/math/rev.hpp>
2+ #include < test/unit/math/rev/util.hpp>
23#include < gtest/gtest.h>
34#include < vector>
45#include < limits>
56
6- TEST (ProbDistributionsGamma, lcdf_values ) {
7+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_values ) {
78 using stan::math::gamma_lcdf;
89 using stan::math::var;
910
@@ -22,7 +23,7 @@ TEST(ProbDistributionsGamma, lcdf_values) {
2223 EXPECT_LE (lcdf_var.val (), 0.0 ); // log of probability
2324}
2425
25- TEST (ProbDistributionsGamma, lcdf_derivatives_y ) {
26+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_derivatives_y ) {
2627 using stan::math::gamma_lcdf;
2728 using stan::math::var;
2829
@@ -47,7 +48,7 @@ TEST(ProbDistributionsGamma, lcdf_derivatives_y) {
4748 EXPECT_TRUE (std::isfinite (grads[0 ]));
4849}
4950
50- TEST (ProbDistributionsGamma, lcdf_derivatives_alpha ) {
51+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_derivatives_alpha ) {
5152 using stan::math::gamma_lcdf;
5253 using stan::math::var;
5354
@@ -70,7 +71,7 @@ TEST(ProbDistributionsGamma, lcdf_derivatives_alpha) {
7071 EXPECT_TRUE (std::isfinite (grads[0 ]));
7172}
7273
73- TEST (ProbDistributionsGamma, lcdf_derivatives_beta ) {
74+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_derivatives_beta ) {
7475 using stan::math::gamma_lcdf;
7576 using stan::math::var;
7677
@@ -93,7 +94,7 @@ TEST(ProbDistributionsGamma, lcdf_derivatives_beta) {
9394 EXPECT_TRUE (std::isfinite (grads[0 ]));
9495}
9596
96- TEST (ProbDistributionsGamma, lcdf_derivatives_all_params ) {
97+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_derivatives_all_params ) {
9798 using stan::math::gamma_lcdf;
9899 using stan::math::var;
99100
@@ -123,7 +124,7 @@ TEST(ProbDistributionsGamma, lcdf_derivatives_all_params) {
123124 EXPECT_GT (grads[0 ], 0.0 ) << " d/dy should be positive" ;
124125}
125126
126- TEST (ProbDistributionsGamma, lcdf_finite_diff_y ) {
127+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_finite_diff_y ) {
127128 using stan::math::gamma_lcdf;
128129 using stan::math::var;
129130
@@ -149,7 +150,7 @@ TEST(ProbDistributionsGamma, lcdf_finite_diff_y) {
149150 EXPECT_NEAR (grad_autodiff, grad_findiff, 1e-5 );
150151}
151152
152- TEST (ProbDistributionsGamma, lcdf_finite_diff_alpha ) {
153+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_finite_diff_alpha ) {
153154 using stan::math::gamma_lcdf;
154155 using stan::math::var;
155156
@@ -176,7 +177,7 @@ TEST(ProbDistributionsGamma, lcdf_finite_diff_alpha) {
176177 EXPECT_NEAR (grad_autodiff, grad_findiff, 1e-3 );
177178}
178179
179- TEST (ProbDistributionsGamma, lcdf_finite_diff_beta ) {
180+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_finite_diff_beta ) {
180181 using stan::math::gamma_lcdf;
181182 using stan::math::var;
182183
@@ -202,7 +203,7 @@ TEST(ProbDistributionsGamma, lcdf_finite_diff_beta) {
202203 EXPECT_NEAR (grad_autodiff, grad_findiff, 1e-5 );
203204}
204205
205- TEST (ProbDistributionsGamma, lcdf_extreme_values_small ) {
206+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_extreme_values_small ) {
206207 using stan::math::gamma_lcdf;
207208 using stan::math::var;
208209
@@ -230,7 +231,7 @@ TEST(ProbDistributionsGamma, lcdf_extreme_values_small) {
230231 }
231232}
232233
233- TEST (ProbDistributionsGamma, lcdf_extreme_values_large ) {
234+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_extreme_values_large ) {
234235 using stan::math::gamma_lcdf;
235236 using stan::math::var;
236237
@@ -258,7 +259,7 @@ TEST(ProbDistributionsGamma, lcdf_extreme_values_large) {
258259 }
259260}
260261
261- TEST (ProbDistributionsGamma, lcdf_alpha_one_derivatives ) {
262+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_alpha_one_derivatives ) {
262263 using stan::math::gamma_lcdf;
263264 using stan::math::var;
264265
@@ -286,7 +287,7 @@ TEST(ProbDistributionsGamma, lcdf_alpha_one_derivatives) {
286287 EXPECT_NEAR (grads[0 ], expected_dy, 1e-10 );
287288}
288289
289- TEST (ProbDistributionsGamma, lcdf_various_parameter_combinations ) {
290+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_various_parameter_combinations ) {
290291 using stan::math::gamma_lcdf;
291292 using stan::math::var;
292293
@@ -322,7 +323,7 @@ TEST(ProbDistributionsGamma, lcdf_various_parameter_combinations) {
322323 }
323324}
324325
325- TEST (ProbDistributionsGamma, lcdf_consistency_with_lccdf ) {
326+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_consistency_with_lccdf ) {
326327 using stan::math::gamma_lccdf;
327328 using stan::math::gamma_lcdf;
328329 using stan::math::var;
@@ -357,7 +358,7 @@ TEST(ProbDistributionsGamma, lcdf_consistency_with_lccdf) {
357358 EXPECT_LT (grads_lccdf[0 ], 0.0 );
358359}
359360
360- TEST (ProbDistributionsGamma, lcdf_second_derivative_y ) {
361+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_second_derivative_y ) {
361362 using stan::math::gamma_lcdf;
362363 using stan::math::var;
363364
@@ -379,7 +380,8 @@ TEST(ProbDistributionsGamma, lcdf_second_derivative_y) {
379380 EXPECT_TRUE (std::isfinite (grads[0 ]));
380381}
381382
382- TEST (ProbDistributionsGamma, lcdf_numerically_challenging_derivatives) {
383+ TEST_F (AgradRev,
384+ ProbDistributionsGamma_lcdf_numerically_challenging_derivatives) {
383385 using stan::math::gamma_lcdf;
384386 using stan::math::var;
385387
@@ -416,7 +418,7 @@ TEST(ProbDistributionsGamma, lcdf_numerically_challenging_derivatives) {
416418 }
417419}
418420
419- TEST (ProbDistributionsGamma, lcdf_monotonic_derivative ) {
421+ TEST_F (AgradRev, ProbDistributionsGamma_lcdf_monotonic_derivative ) {
420422 using stan::math::gamma_lcdf;
421423 using stan::math::var;
422424
0 commit comments