Skip to content

Commit 4cf6533

Browse files
committed
Update tests
1 parent 4cdc57d commit 4cf6533

54 files changed

Lines changed: 62 additions & 177 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/unit/math/mix/core/operator_division_test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ struct operator_divide_tester {
5555
} // namespace stan
5656

5757
TEST(mathMixCore, operatorDivisionVarMat) {
58-
auto f = [](const auto& x1, const auto& x2) { return x1 / x2; };
59-
6058
Eigen::MatrixXd mat1(2, 2);
6159
mat1 << -2, -1, 0.5, 2.8;
6260
Eigen::MatrixXd mat2 = mat1.reverse();

test/unit/math/mix/core/operator_minus_minus_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ TEST(mathMixCore, operatorMinusMinusPre1) {
55
auto f = [](const auto& x1) {
66
auto y = x1;
77
auto z = --y;
8+
// Suppress unused variable warning
9+
z = z + 0;
810
return y;
911
};
1012
stan::test::expect_common_unary(f);
@@ -24,6 +26,8 @@ TEST(mathMixCore, operatorMinusMinusPost1) {
2426
auto f = [](const auto& x1) {
2527
auto y = x1;
2628
auto z = y--;
29+
// Suppress unused variable warning
30+
z = z + 0;
2731
return y;
2832
};
2933
stan::test::expect_common_unary(f);

test/unit/math/mix/core/operator_plus_plus_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ TEST(mathMixCore, operatorPlusPlusPre1) {
55
auto f = [](const auto& x1) {
66
auto y = x1;
77
auto z = ++y;
8+
// Suppress unused variable warning
9+
z = z + 0;
810
return y;
911
};
1012
stan::test::expect_common_unary(f);
@@ -24,6 +26,8 @@ TEST(mathMixCore, operatorPlusPlusPost1) {
2426
auto f = [](const auto& x1) {
2527
auto y = x1;
2628
auto z = y++;
29+
// Suppress unused variable warning
30+
z = z + 0;
2731
return y;
2832
};
2933
stan::test::expect_common_unary(f);

test/unit/math/opencl/rev/add_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ TEST(OpenCLPrim, add_m_small_zero) {
5050
stan::math::test::compare_cpu_opencl_prim_rev(add_functor, d0, d0);
5151

5252
double d3 = 3.0;
53-
auto a = stan::math::add(d1, d3);
5453
stan::math::test::compare_cpu_opencl_prim_rev(add_functor, d1, d3);
5554
stan::math::test::compare_cpu_opencl_prim_rev(add_functor, d3, d1);
5655
stan::math::test::compare_cpu_opencl_prim_rev(add_functor, d3, d0);

test/unit/math/opencl/rev/cauchy_cdf_test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ auto cauchy_cdf_functor = [](const auto& y, const auto& mu, const auto& sigma) {
6262

6363
TEST(ProbDistributionsCauchyCdf, opencl_matches_cpu_small) {
6464
int N = 3;
65-
int M = 2;
6665

6766
Eigen::VectorXd y(N);
6867
y << 0.3, 0.8, 1.0;
@@ -80,7 +79,6 @@ TEST(ProbDistributionsCauchyCdf, opencl_matches_cpu_small) {
8079

8180
TEST(ProbDistributionsCauchyCdf, opencl_matches_cpu_small_y_neg_inf) {
8281
int N = 3;
83-
int M = 2;
8482

8583
Eigen::VectorXd y(N);
8684
y << 0.3, -INFINITY, 1.0;

test/unit/math/opencl/rev/dirichlet_lpdf_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ auto dirichlet_lpdf_functor_propto = [](const auto& theta, const auto& alpha) {
7676

7777
TEST(ProbDistributionsDirichlet, opencl_matches_cpu_small) {
7878
int N = 3;
79-
int M = 2;
8079

8180
Eigen::VectorXd theta1(N);
8281
theta1 << 0.5, 0.4, 0.1;

test/unit/math/opencl/rev/exp_mod_normal_lcdf_test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ auto exp_mod_normal_lcdf_functor
8888

8989
TEST(ProbDistributionsDoubleExpModNormalLcdf, opencl_matches_cpu_small) {
9090
int N = 3;
91-
int M = 2;
9291

9392
Eigen::VectorXd y(N);
9493
y << -0.3, 1.8, 1.4;
@@ -109,7 +108,6 @@ TEST(ProbDistributionsDoubleExpModNormalLcdf, opencl_matches_cpu_small) {
109108
TEST(ProbDistributionsDoubleExpModNormalLcdf,
110109
opencl_matches_cpu_small_y_pos_inf) {
111110
int N = 3;
112-
int M = 2;
113111

114112
Eigen::VectorXd y(N);
115113
y << -0.3, 1.8, INFINITY;
@@ -130,7 +128,6 @@ TEST(ProbDistributionsDoubleExpModNormalLcdf,
130128
TEST(ProbDistributionsDoubleExpModNormalLcdf,
131129
opencl_matches_cpu_small_y_neg_inf) {
132130
int N = 3;
133-
int M = 2;
134131

135132
Eigen::VectorXd y(N);
136133
y << -0.3, 1.8, -INFINITY;

test/unit/math/opencl/rev/normal_lpdf_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ auto normal_lpdf_functor_propto
6767

6868
TEST(ProbDistributionsNormal, opencl_matches_cpu_small) {
6969
int N = 3;
70-
int M = 2;
7170

7271
Eigen::VectorXd y(N);
7372
y << 0.3, 0.8, 1.0;

test/unit/math/opencl/rev/scaled_inv_chi_square_lpdf_test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ auto scaled_inv_chi_square_lpdf_functor_propto
7777

7878
TEST(ProbDistributionsScaledInvChiSquare, opencl_matches_cpu_small) {
7979
int N = 3;
80-
int M = 2;
8180

8281
Eigen::VectorXd y(N);
8382
y << 0.3, 0.8, 1.0;
@@ -100,7 +99,6 @@ TEST(ProbDistributionsScaledInvChiSquare, opencl_matches_cpu_small) {
10099

101100
TEST(ProbDistributionsScaledInvChiSquare, opencl_matches_cpu_small_y_negative) {
102101
int N = 3;
103-
int M = 2;
104102

105103
Eigen::VectorXd y(N);
106104
y << 0.3, -0.8, 1.0;

test/unit/math/opencl/rev/student_t_lpdf_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ auto student_t_lpdf_functor_propto
9191

9292
TEST(ProbDistributionsStudentT, opencl_matches_cpu_small) {
9393
int N = 3;
94-
int M = 2;
9594

9695
Eigen::VectorXd y(N);
9796
y << 0.3, -0.8, 1.0;

0 commit comments

Comments
 (0)