Skip to content

Commit

Permalink
Fix test name collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Sep 19, 2023
1 parent 545cdee commit a7bf561
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 30 deletions.
12 changes: 6 additions & 6 deletions test/unit/math/mix/fun/cols_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <test/unit/math/mix/util.hpp>
#include <gtest/gtest.h>

TEST_F(mathMix, vector_fv) {
TEST_F(mathMix, cols_vector_fv) {
using stan::math::cols;
using stan::math::fvar;
using stan::math::row_vector_fv;
Expand All @@ -22,7 +22,7 @@ TEST_F(mathMix, vector_fv) {
v.resize(0);
EXPECT_EQ(1U, cols(v));
}
TEST_F(mathMix, rowvector_fv) {
TEST_F(mathMix, cols_rowvector_fv) {
using stan::math::cols;
using stan::math::fvar;
using stan::math::row_vector_fv;
Expand All @@ -41,7 +41,7 @@ TEST_F(mathMix, rowvector_fv) {
rv.resize(0);
EXPECT_EQ(0U, cols(rv));
}
TEST_F(mathMix, matrix_fv) {
TEST_F(mathMix, cols_matrix_fv) {
using stan::math::cols;
using stan::math::fvar;
using stan::math::matrix_fv;
Expand All @@ -60,7 +60,7 @@ TEST_F(mathMix, matrix_fv) {
m.resize(5, 0);
EXPECT_EQ(0U, cols(m));
}
TEST_F(mathMix, vector_ffv) {
TEST_F(mathMix, cols_vector_ffv) {
using stan::math::cols;
using stan::math::fvar;
using stan::math::row_vector_ffv;
Expand Down Expand Up @@ -90,7 +90,7 @@ TEST_F(mathMix, vector_ffv) {
v.resize(0);
EXPECT_EQ(1U, cols(v));
}
TEST_F(mathMix, rowvector_ffv) {
TEST_F(mathMix, cols_rowvector_ffv) {
using stan::math::cols;
using stan::math::fvar;
using stan::math::row_vector_ffv;
Expand Down Expand Up @@ -119,7 +119,7 @@ TEST_F(mathMix, rowvector_ffv) {
rv.resize(0);
EXPECT_EQ(0U, cols(rv));
}
TEST_F(mathMix, matrix_ffv) {
TEST_F(mathMix, cols_matrix_ffv) {
using stan::math::cols;
using stan::math::fvar;
using stan::math::matrix_ffv;
Expand Down
4 changes: 2 additions & 2 deletions test/unit/math/mix/fun/dims_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <gtest/gtest.h>
#include <vector>

TEST_F(mathMix, matrix_fv) {
TEST_F(mathMix, dims_matrix_fv) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::dims;
Expand Down Expand Up @@ -60,7 +60,7 @@ TEST_F(mathMix, matrix_fv) {
EXPECT_EQ(8, dims8[2]);
}

TEST_F(mathMix, matrix_ffv) {
TEST_F(mathMix, dims_matrix_ffv) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::dims;
Expand Down
8 changes: 4 additions & 4 deletions test/unit/math/mix/fun/fill_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <gtest/gtest.h>
#include <vector>

TEST_F(mathMix, fv) {
TEST_F(mathMix, Fillfv) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::fill;
Expand Down Expand Up @@ -45,7 +45,7 @@ TEST_F(mathMix, fv) {
for (size_t j = 0; j < 2; ++j)
EXPECT_FLOAT_EQ(54, d[i][j].val_.val());
}
TEST_F(mathMix, fv2) {
TEST_F(mathMix, Fillfv2) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::fill;
Expand All @@ -57,7 +57,7 @@ TEST_F(mathMix, fv2) {
EXPECT_FLOAT_EQ(3.0, y[0].val_.val());
}

TEST_F(mathMix, ffv) {
TEST_F(mathMix, Fillffv) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::fill;
Expand Down Expand Up @@ -99,7 +99,7 @@ TEST_F(mathMix, ffv) {
for (size_t j = 0; j < 2; ++j)
EXPECT_FLOAT_EQ(54, d[i][j].val_.val_.val());
}
TEST_F(mathMix, ffv2) {
TEST_F(mathMix, Fillffv2) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::fill;
Expand Down
8 changes: 4 additions & 4 deletions test/unit/math/mix/fun/initialize_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <gtest/gtest.h>
#include <vector>

TEST_F(mathMix, fv) {
TEST_F(mathMix, Initializefv) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::fvar;
Expand Down Expand Up @@ -45,7 +45,7 @@ TEST_F(mathMix, fv) {
for (size_t j = 0; j < 2; ++j)
EXPECT_FLOAT_EQ(54, d[i][j].val_.val());
}
TEST_F(mathMix, fv2) {
TEST_F(mathMix, Initializefv2) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::fvar;
Expand All @@ -57,7 +57,7 @@ TEST_F(mathMix, fv2) {
EXPECT_FLOAT_EQ(3.0, y[0].val_.val());
}

TEST_F(mathMix, ffv) {
TEST_F(mathMix, Initializeffv) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::fvar;
Expand Down Expand Up @@ -99,7 +99,7 @@ TEST_F(mathMix, ffv) {
for (size_t j = 0; j < 2; ++j)
EXPECT_FLOAT_EQ(54, d[i][j].val_.val_.val());
}
TEST_F(mathMix, ffv2) {
TEST_F(mathMix, Initializeffv2) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::fvar;
Expand Down
16 changes: 8 additions & 8 deletions test/unit/math/mix/functor/autodiff_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct norm_functor {
}
};

TEST_F(mathMix, func_derivative) {
TEST_F(mathMix, autodiff_func_derivative) {
fun0 f;
double x = 7;
double fx;
Expand All @@ -52,7 +52,7 @@ TEST_F(mathMix, func_derivative) {
EXPECT_FLOAT_EQ(d, 5 * 3 * 7 * 7);
}

TEST_F(mathMix, func_partialDerivative) {
TEST_F(mathMix, autodiff_func_partialDerivative) {
fun1 f;
Matrix<double, Dynamic, 1> x(2);
x << 5, 7;
Expand All @@ -70,7 +70,7 @@ TEST_F(mathMix, func_partialDerivative) {
EXPECT_FLOAT_EQ(5 * 5 + 3 * 2 * 7, d2);
}

TEST_F(mathMix, func_gradientDotVector) {
TEST_F(mathMix, autodiff_func_gradientDotVector) {
using stan::math::var;
fun1 f;
Matrix<double, Dynamic, 1> x(2);
Expand All @@ -88,7 +88,7 @@ TEST_F(mathMix, func_gradientDotVector) {

EXPECT_FLOAT_EQ(grad_fx_dot_v_expected, grad_fx_dot_v);
}
TEST_F(mathMix, func_hessianTimesVector) {
TEST_F(mathMix, autodiff_func_hessianTimesVector) {
using stan::math::hessian_times_vector;

fun1 f;
Expand All @@ -110,7 +110,7 @@ TEST_F(mathMix, func_hessianTimesVector) {
EXPECT_FLOAT_EQ(2 * x(0) * v(0) + 6 * v(1), Hv(1));
}

TEST_F(mathMix, func_jacobian) {
TEST_F(mathMix, autodiff_func_jacobian) {
using stan::math::jacobian;

fun2 f;
Expand Down Expand Up @@ -144,7 +144,7 @@ TEST_F(mathMix, func_jacobian) {
EXPECT_FLOAT_EQ(6, J_rev(1, 1));
}

TEST_F(mathMix, func_hessian) {
TEST_F(mathMix, autodiff_func_hessian) {
fun1 f;
Matrix<double, Dynamic, 1> x(2);
x << 5, 7;
Expand Down Expand Up @@ -186,7 +186,7 @@ TEST_F(mathMix, func_hessian) {
EXPECT_FLOAT_EQ(2 * 3, H2(1, 1));
}

TEST_F(mathMix, func_GradientTraceMatrixTimesHessian) {
TEST_F(mathMix, autodiff_func_GradientTraceMatrixTimesHessian) {
Matrix<double, Dynamic, Dynamic> M(2, 2);
M << 11, 13, 17, 23;
fun1 f;
Expand All @@ -200,7 +200,7 @@ TEST_F(mathMix, func_GradientTraceMatrixTimesHessian) {
EXPECT_FLOAT_EQ(22, grad_tr_MH(1));
}

TEST_F(mathMix, func_GradientHessian) {
TEST_F(mathMix, autodiff_func_GradientHessian) {
norm_functor log_normal_density;
third_order_mixed mixed_third_poly;

Expand Down
12 changes: 6 additions & 6 deletions test/unit/math/mix/functor/finite_diff_hessian_auto_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct sum_functor {
}
};

TEST_F(mathMix, func_gradient) {
TEST_F(mathMix, finite_diff_func_gradient) {
using Eigen::Dynamic;
using Eigen::Matrix;

Expand Down Expand Up @@ -57,7 +57,7 @@ TEST_F(mathMix, func_gradient) {
}
}

TEST_F(mathMix, func_hessian) {
TEST_F(mathMix, finite_diff_func_hessian) {
using Eigen::Dynamic;
using Eigen::Matrix;
third_order_mixed f;
Expand Down Expand Up @@ -110,7 +110,7 @@ TEST_F(mathMix, func_hessian) {
}
}

TEST_F(mathMix, func_gradHessianResizingTest) {
TEST_F(mathMix, finite_diff_func_gradHessianResizingTest) {
// failed in 2.19 before grad_hess_fx.clear() was added
norm_functor f;
Eigen::VectorXd x(3);
Expand All @@ -126,7 +126,7 @@ TEST_F(mathMix, func_gradHessianResizingTest) {
EXPECT_EQ(x.size(), hess.cols());
}

TEST_F(mathMix, func_grad_hessian) {
TEST_F(mathMix, finite_diff_func_grad_hessian) {
using Eigen::Dynamic;
using Eigen::Matrix;
norm_functor norm;
Expand Down Expand Up @@ -188,7 +188,7 @@ TEST_F(mathMix, func_grad_hessian) {
}
}

TEST_F(mathMix, func_gradientZeroOneArg) {
TEST_F(mathMix, finite_diff_func_gradientZeroOneArg) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::sum;
Expand Down Expand Up @@ -223,7 +223,7 @@ TEST_F(mathMix, func_gradientZeroOneArg) {
f_z_grad_sum);
}

TEST_F(mathMix, func_hessianZeroOneArg) {
TEST_F(mathMix, finite_diff_func_hessianZeroOneArg) {
using Eigen::Dynamic;
using Eigen::Matrix;
using stan::math::sum;
Expand Down

0 comments on commit a7bf561

Please sign in to comment.