<commit_before>// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file.

#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>

#define BUFFER_SIZE (1024 * 1024)

uint8_t global_got_buffer[BUFFER_SIZE];
uint8_t global_want_buffer[BUFFER_SIZE];
uint8_t global_src_buffer[BUFFER_SIZE];
uint8_t global_palette_buffer[3 * 256];

char fail_msg[65536] = {0};

#define FAIL(...) snprintf(fail_msg, sizeof(fail_msg), ##__VA_ARGS__)
#define INCR_FAIL(msg, ...) \
  msg += snprintf(msg, sizeof(fail_msg) - (msg - fail_msg), ##__VA_ARGS__)

int tests_run = 0;

typedef void (*proc)();

proc benches[];
proc tests[];

const char* proc_filename;
const char* proc_funcname = "";

// The order matters here. Clang also defines "__GNUC__".
#if defined(__clang__)
const char* cc = "clang";
#elif defined(__GNUC__)
const char* cc = "gcc";
#elif defined(_MSC_VER)
const char* cc = "cl";
#else
const char* cc = "cc";
#endif

typedef struct {
  const char* want_filename;
  const char* src_filename;<commit_msg>Increase soem testlib buffer sizes.<commit_after>// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file.

#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>

#define BUFFER_SIZE (64 * 1024 * 1024)
#define PALETTE_BUFFER_SIZE (4 * 245)

uint8_t global_got_buffer[BUFFER_SIZE];
uint8_t global_want_buffer[BUFFER_SIZE];
uint8_t global_src_buffer[BUFFER_SIZE];
uint8_t global_palette_buffer[PALETTE_BUFFER_SIZE];

char fail_msg[65536] = {0};

#define FAIL(...) snprintf(fail_msg, sizeof(fail_msg), ##__VA_ARGS__)
#define INCR_FAIL(msg, ...) \
  msg += snprintf(msg, sizeof(fail_msg) - (msg - fail_msg), ##__VA_ARGS__)

int tests_run = 0;

typedef void (*proc)();

proc benches[];
proc tests[];

const char* proc_filename;
const char* proc_funcname = "";

// The order matters here. Clang also defines "__GNUC__".
#if defined(__clang__)
const char* cc = "clang";
#elif defined(__GNUC__)
const char* cc = "gcc";
#elif defined(_MSC_VER)
const char* cc = "cl";
#else
const char* cc = "cc";
#endif

typedef struct {
  const char* want_filename;
  const char* src_filename;
{'fraction_non_alphanumeric': 0.1375166889185581, 'fraction_numerical': 0.021361815754339118, 'mean_word_length': 5.26183844011142, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '1275229', 'n_tokens_mistral': 858, 'n_tokens_neox': 808, 'n_words': 237}