<commit_before>#include <cgreen/cgreen.h>

#include "cgreen_value_internal.h"

#ifdef __cplusplus
using namespace cgreen;
#endif

Describe(CgreenValue);
BeforeEach(CgreenValue) {}
AfterEach(CgreenValue) {}

Ensure(CgreenValue, makes_integer_value) {
    CgreenValue value = make_cgreen_integer_value(14);
    assert_that(value.type, is_equal_to(INTEGER));
    assert_that(value.value.integer_value, is_equal_to(14));
}

Ensure(CgreenValue, makes_string_value) {
    CgreenValue value = make_cgreen_string_value("hej hopp");
    assert_that(value.type, is_equal_to(STRING));
    assert_that(value.value.string_value, is_equal_to_string("hej hopp"));
}

Ensure(CgreenValue, makes_pointer_value) {
    int buffer[20];
    CgreenValue value = make_cgreen_pointer_value(buffer);
    assert_that(value.type, is_equal_to(POINTER));
    assert_that(value.value.string_value, is_equal_to(buffer));
}

Ensure(CgreenValue, makes_double_value) {
    CgreenValue value = make_cgreen_double_value(3.1415926);
    assert_that(value.type, is_equal_to(DOUBLE));
    assert_that(box_double(value.value.double_value), is_equal_to_double(3.1415926));
}<commit_msg>Fix a "typo" when asserting double actuals<commit_after>#include <cgreen/cgreen.h>

#include "cgreen_value_internal.h"

#ifdef __cplusplus
using namespace cgreen;
#endif

Describe(CgreenValue);
BeforeEach(CgreenValue) {}
AfterEach(CgreenValue) {}

Ensure(CgreenValue, makes_integer_value) {
    CgreenValue value = make_cgreen_integer_value(14);
    assert_that(value.type, is_equal_to(INTEGER));
    assert_that(value.value.integer_value, is_equal_to(14));
}

Ensure(CgreenValue, makes_string_value) {
    CgreenValue value = make_cgreen_string_value("hej hopp");
    assert_that(value.type, is_equal_to(STRING));
    assert_that(value.value.string_value, is_equal_to_string("hej hopp"));
}

Ensure(CgreenValue, makes_pointer_value) {
    int buffer[20];
    CgreenValue value = make_cgreen_pointer_value(buffer);
    assert_that(value.type, is_equal_to(POINTER));
    assert_that(value.value.string_value, is_equal_to(buffer));
}

Ensure(CgreenValue, makes_double_value) {
    CgreenValue value = make_cgreen_double_value(3.1415926);
    assert_that(value.type, is_equal_to(DOUBLE));
    assert_that_double(value.value.double_value, is_equal_to_double(3.1415926));
}
{'fraction_non_alphanumeric': 0.11505190311418685, 'fraction_numerical': 0.01903114186851211, 'mean_word_length': 6.948453608247423, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '938632', 'n_tokens_mistral': 854, 'n_tokens_neox': 841, 'n_words': 112}