Skip to content

Commit

Permalink
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-buildbot committed Dec 20, 2023
1 parent 4a6db08 commit 2acfdd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stan/math/prim/err/check_symmetric.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ template <typename EigMat, require_matrix_t<EigMat>* = nullptr>
inline void check_symmetric(const char* function, const char* name,
const EigMat& y) {
check_square(function, name, y);
using std::fabs;
using stan::math::fabs;
using std::fabs;

Eigen::Index k = y.rows();
if (k <= 1) {
Expand Down
9 changes: 4 additions & 5 deletions test/unit/math/prim/err/check_symmetric_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,13 @@ TEST(ErrorHandlingMatrix, checkSymmetric_non_square) {
std::invalid_argument);
}


TEST(ErrorHandlingMatrix, checkSymmetric_complex) {
Eigen::MatrixXcd y(2,2);
y << std::complex<double>(1,1), std::complex<double>(2,2),
std::complex<double>(2,2), std::complex<double>(1,1);
Eigen::MatrixXcd y(2, 2);
y << std::complex<double>(1, 1), std::complex<double>(2, 2),
std::complex<double>(2, 2), std::complex<double>(1, 1);

EXPECT_NO_THROW(stan::math::check_symmetric("checkSymmetric", "y", y));
y(0,1) = std::complex<double>(2,3);
y(0, 1) = std::complex<double>(2, 3);
EXPECT_THROW(stan::math::check_symmetric("checkSymmetric", "y", y),
std::domain_error);
}

0 comments on commit 2acfdd5

Please sign in to comment.