<commit_before>#include "space_age.h"
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <cmath>

namespace
{
const double accuracy = 0.005;
}

BOOST_AUTO_TEST_CASE(age_in_seconds)
{
    const space_age::space_age age(1000000);

    BOOST_REQUIRE_EQUAL(1000000, age.seconds());
}

#if defined(EXERCISM_RUN_ALL_TESTS)
BOOST_AUTO_TEST_CASE(age_in_earth_years)
{
    const space_age::space_age age(1000000000);

    BOOST_REQUIRE_LT(std::abs(31.69 - age.on_earth()), accuracy);
}

BOOST_AUTO_TEST_CASE(age_in_mercury_years)
{
    const space_age::space_age age(2134835688);

    BOOST_REQUIRE_LT(std::abs(67.65 - age.on_earth()), accuracy);
    BOOST_REQUIRE_LT(std::abs(280.88 - age.on_mercury()), accuracy);
}

BOOST_AUTO_TEST_CASE(age_in_venus_years)
{
    const space_age::space_age age(189839836);

    BOOST_REQUIRE_LT(std::abs(6.02- age.on_earth()), accuracy);
    BOOST_REQUIRE_LT(std::abs(9.78 - age.on_venus()), accuracy);<commit_msg>Surround math operator with space (#219)<commit_after>#include "space_age.h"
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <cmath>

namespace
{
const double accuracy = 0.005;
}

BOOST_AUTO_TEST_CASE(age_in_seconds)
{
    const space_age::space_age age(1000000);

    BOOST_REQUIRE_EQUAL(1000000, age.seconds());
}

#if defined(EXERCISM_RUN_ALL_TESTS)
BOOST_AUTO_TEST_CASE(age_in_earth_years)
{
    const space_age::space_age age(1000000000);

    BOOST_REQUIRE_LT(std::abs(31.69 - age.on_earth()), accuracy);
}

BOOST_AUTO_TEST_CASE(age_in_mercury_years)
{
    const space_age::space_age age(2134835688);

    BOOST_REQUIRE_LT(std::abs(67.65 - age.on_earth()), accuracy);
    BOOST_REQUIRE_LT(std::abs(280.88 - age.on_mercury()), accuracy);
}

BOOST_AUTO_TEST_CASE(age_in_venus_years)
{
    const space_age::space_age age(189839836);

    BOOST_REQUIRE_LT(std::abs(6.02 - age.on_earth()), accuracy);
    BOOST_REQUIRE_LT(std::abs(9.78 - age.on_venus()), accuracy);
{'fraction_non_alphanumeric': 0.13720452209660844, 'fraction_numerical': 0.06937307297019528, 'mean_word_length': 6.237918215613383, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '3297102', 'n_tokens_mistral': 884, 'n_tokens_neox': 775, 'n_words': 100}