<commit_before>#include <stan/math/error_handling/matrix/check_not_nan.hpp>
#include <gtest/gtest.h>
#include <stan/math/matrix/typedefs.hpp>
#include <stdexcept>

TEST(stanMathMatrixErrorHandling, checkNotNanEigenRow) {
  stan::math::vector_d y;
  double result;
  y.resize(3);
  
  EXPECT_TRUE(stan::math::check_not_nan("checkNotNanEigenRow(%1)",
                                        y, "y", &result));
  EXPECT_TRUE(stan::math::check_not_nan("checkNotNanEigenRow(%1)",
                                        y, "y"));
  
  y(1) = std::numeric_limits<double>::quiet_NaN();
  EXPECT_THROW(stan::math::check_not_nan("checkNotNanEigenRow(%1%)", y, "y", &result), 
               std::domain_error);<commit_msg>moving check_not_nan tests out of math/matrix_error_handling_test.cpp<commit_after>#include <stan/math/error_handling/matrix/check_not_nan.hpp>
#include <gtest/gtest.h>
#include <stan/math/matrix/typedefs.hpp>
#include <stdexcept>

TEST(MathErrorHandlingMatrix, checkNotNanEigenRow) {
  stan::math::vector_d y;
  double result;
  y.resize(3);
  
  EXPECT_TRUE(stan::math::check_not_nan("checkNotNanEigenRow(%1)",
                                        y, "y", &result));
  EXPECT_TRUE(stan::math::check_not_nan("checkNotNanEigenRow(%1)",
                                        y, "y"));
  
  y(1) = std::numeric_limits<double>::quiet_NaN();
  EXPECT_THROW(stan::math::check_not_nan("checkNotNanEigenRow(%1%)", y, "y", &result), 
               std::domain_error);
{'fraction_non_alphanumeric': 0.15561569688768606, 'fraction_numerical': 0.006765899864682003, 'mean_word_length': 3.53680981595092, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4227760', 'n_tokens_mistral': 515, 'n_tokens_neox': 500, 'n_words': 62}