<commit_before>#include "../element.h"
#include "gtest/gtest.h"
#include <sstream>
#include <string>
#include <iostream>
#include <array>
#include <vector>
#include <set>

TEST(Decoding, Int32)
{
  bson::Element e;
  unsigned char bs[4];
  for (int i=0; i<10000; i++)
  {
    mempcpy(bs, &i, sizeof(i));
    e.decode(bs, bson::INT32);
    ASSERT_EQ(i, e.data<int>());
  }
}

TEST(Decoding, Int64)
{
  bson::Element e;
  unsigned char bs[8];
  for (long i=0; i<100000; i++)
  {
    mempcpy(bs, &i, sizeof(i));
    e.decode(bs, bson::INT64);
    ASSERT_EQ(i, e.data<long>());<commit_msg>apparently mempcpy is a thing. whew knew?<commit_after>#include "../element.h"
#include "gtest/gtest.h"
#include <sstream>
#include <string>
#include <iostream>
#include <array>
#include <vector>
#include <set>

TEST(Decoding, Int32)
{
  bson::Element e;
  unsigned char bs[4];
  for (int i=0; i<10000; i++)
  {
    memcpy(bs, &i, sizeof(i));
    e.decode(bs, bson::INT32);
    ASSERT_EQ(i, e.data<int>());
  }
}

TEST(Decoding, Int64)
{
  bson::Element e;
  unsigned char bs[8];
  for (long i=0; i<100000; i++)
  {
    memcpy(bs, &i, sizeof(i));
    e.decode(bs, bson::INT64);
    ASSERT_EQ(i, e.data<long>());
{'fraction_non_alphanumeric': 0.2040133779264214, 'fraction_numerical': 0.038461538461538464, 'mean_word_length': 4.115384615384615, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 19, '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': '3360057', 'n_tokens_mistral': 539, 'n_tokens_neox': 508, 'n_words': 113}