<commit_before>#include <Step/SPFFunctions.h>
#include <Step/String.h>
#include <Step/SimpleTypes.h>
#include "../../tests.h"

#include <sstream>


/// tests for ticket4

/**
All references to atof are now using the program's locale.
So for french the decimal separator is a , (comma) not a
point leading to wrong string to real conversions.
*/

#define REAL_VALUE -0.000000000000009991
#define REAL_STRING "-0.000000000000009991"

int main (int /*n*/, char ** /*p*/)
{
    std::string real_string(REAL_STRING);

    Step::Real real_value =
        Step::spfToReal(real_string);

    TEST_ASSERT(real_value == REAL_VALUE)

    std::cout << std::endl << "Failure : " << failure_results << " Success : " << success_results << std::endl;

    return failure_results;
}
<commit_msg>make test compare precision instead of equality<commit_after>#include <Step/SPFFunctions.h>
#include <Step/String.h>
#include <Step/SimpleTypes.h>
#include "../../tests.h"

#include <sstream>


/// tests for ticket4

/**
All references to atof are now using the program's locale.
So for french the decimal separator is a , (comma) not a
point leading to wrong string to real conversions.
*/

#define REAL_VALUE -0.000000000000009991
#define REAL_STRING "-0.000000000000009991"

int main (int /*n*/, char ** /*p*/)
{
    std::string real_string(REAL_STRING);

    Step::Real real_value =
        Step::spfToReal(real_string);

	Step::Real diff = real_value - REAL_VALUE;
    TEST_ASSERT( -0.000000000000000001 < diff);
	TEST_ASSERT( diff < 0.000000000000000001 );

    std::cout << std::endl << "Failure : " << failure_results << " Success : " << success_results << std::endl;

    return failure_results;
}

{'fraction_non_alphanumeric': 0.13887240356083086, 'fraction_numerical': 0.06884272997032641, 'mean_word_length': 4.002967359050445, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, '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': '4308556', 'n_tokens_mistral': 642, 'n_tokens_neox': 532, 'n_words': 154}