<commit_before>#include <stan/math/functions/as_bool.hpp>
#include <gtest/gtest.h>

TEST(MathFunctions, as_bool) {
  using stan::math::as_bool;
  EXPECT_TRUE(as_bool(1));
  EXPECT_TRUE(as_bool(1.7));
  EXPECT_TRUE(as_bool(-1.7));
  EXPECT_TRUE(as_bool(std::numeric_limits<double>::infinity()));
  EXPECT_TRUE(as_bool(-std::numeric_limits<double>::infinity()));

  EXPECT_FALSE(as_bool(0));
  EXPECT_FALSE(as_bool(0.0));
  EXPECT_FALSE(as_bool(0.0f));<commit_msg>adding failing tests for as_bool with integer argument<commit_after>#include <stan/math/functions/as_bool.hpp>
#include <gtest/gtest.h>

TEST(MathFunctions, as_bool) {
  using stan::math::as_bool;
  EXPECT_TRUE(as_bool(1));
  EXPECT_TRUE(as_bool(1.7));
  EXPECT_TRUE(as_bool(-1.7));
  EXPECT_TRUE(as_bool(std::numeric_limits<double>::infinity()));
  EXPECT_TRUE(as_bool(-std::numeric_limits<double>::infinity()));

  EXPECT_FALSE(as_bool(0));
  EXPECT_FALSE(as_bool(0.0));
  EXPECT_FALSE(as_bool(0.0f));

  EXPECT_EQ(true, as_bool(10));
  EXPECT_EQ(true, as_bool(-1));
  EXPECT_EQ(false, as_bool(0));
{'fraction_non_alphanumeric': 0.17984934086629, 'fraction_numerical': 0.022598870056497175, 'mean_word_length': 8.008474576271187, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7050302', 'n_tokens_mistral': 418, 'n_tokens_neox': 430, 'n_words': 44}