<commit_before>/* $Id$ */

/* PDCLib testing suite <_PDCLIB_test.h>

   This file is part of the Public Domain C Library (PDCLib).
   Permission is granted to use, modify, and / or redistribute at will.
*/

/* -------------------------------------------------------------------------- */
/* Helper macros for test drivers                                             */
/* -------------------------------------------------------------------------- */

#include <stdio.h>

char const abcde[] = "abcde";
char const abcdx[] = "abcdx";
char const * teststring = "1234567890\nABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz\n";

int NO_TESTDRIVER = 0;

static int rc = 0;

#define TESTCASE( x ) if ( x ) {} \
                      else { rc += 1; printf( "FAILED: " __FILE__ ", line %d - " #x "\n", __LINE__ ); }

#ifndef REGTEST
#define TESTCASE_NOREG( x ) TESTCASE( x )
#else
#define TESTCASE_NOREG( x )
#endif

#define TEST_RESULTS  rc
<commit_msg>Testcase printing made safe.<commit_after>/* $Id$ */

/* PDCLib testing suite <_PDCLIB_test.h>

   This file is part of the Public Domain C Library (PDCLib).
   Permission is granted to use, modify, and / or redistribute at will.
*/

/* -------------------------------------------------------------------------- */
/* Helper macros for test drivers                                             */
/* -------------------------------------------------------------------------- */

#include <stdio.h>

char const abcde[] = "abcde";
char const abcdx[] = "abcdx";
char const * teststring = "1234567890\nABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz\n";

int NO_TESTDRIVER = 0;

static int rc = 0;

#define TESTCASE( x ) if ( x ) {} \
                      else { rc += 1; printf( "FAILED: " __FILE__ ", line %d - %s\n", __LINE__, #x ); }

#ifndef REGTEST
#define TESTCASE_NOREG( x ) TESTCASE( x )
#else
#define TESTCASE_NOREG( x )
#endif

#define TEST_RESULTS  rc

{'fraction_non_alphanumeric': 0.2631578947368421, 'fraction_numerical': 0.01354872329338197, 'mean_word_length': 1.5737265415549597, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3709276', 'n_tokens_mistral': 604, 'n_tokens_neox': 571, 'n_words': 173}