<commit_before>#include <stdio.h>
#include "../src/harness.h"

void test_modTen (TestResult* result, int seed)
{
	srand(seed);

	int num = rand() % 10;

	report(result, "using number %d", num);
	affirm(result, num >= 0, "modulo 10 must be greater or equal to 0");
	affirm(result, num < 10, "modulo 10 must be less than 10");
}

void test_modNine (TestResult* result, int seed)
{
	srand(seed);

	int num = rand() % 9;

	report(result, "using number %d", num);
	affirm(result, num >= 0, "modulo 9 must be greater or equal to 0");
	affirm(result, num < 9, "modulo 9 must be less than 9");
}

int main (int argc, char** argv)
{
	int seed = 55;
	doTest("Test modulo",
			(TestFunc[]) {
				{ test_modTen, "modTen" },
				{ test_modTen, "modNine" }
			},
			2,
			seed,
			ALL_INFO);

	return 0;
}
<commit_msg>update test_readme example to match new readme<commit_after>#include <stdio.h>
#include "../src/harness.h"

void test_modTen (TestResult* result, int seed)
{
	srand(seed);

	int num = rand() % 10;

	report(result, "using number %d", num);
	affirm(result, num >= 0, "modulo 10 must be greater or equal to 0");
	affirm(result, num < 10, "modulo 10 must be less than 10");
}

void test_minusTen (TestResult* result, int seed)
{
	srand(seed);

	int num = rand();;
	int num_minus_ten = num - 10;

	onSuccess(result, "yes!");
	onFailure(result, "no!");

	affirm(result, num > num_minus_ten, "subtracting ten from a number makes it smaller");
}

void test_plusTen (TestResult* result, int seed)
{
	srand(seed);

	int num = rand();;
	int num_plus_ten = num + 10;

	affirm(result, num > num_plus_ten, "adding ten to a number makes it smaller");
}

int main (int argc, char** argv)
{
	printf("This test contains three unit tests\n");
	printf("The first two should succeed and the final one should fail\n");
	printf("\n");

	int seed = 55;
	doTest("Test some functions",
			(TestFunc[]) {
				{ test_modTen, "modTen" },
				{ test_minusTen, "minusTen" },
				{ test_plusTen, "plusTen" },
			},
			3,
			seed,
			ALL_INFO);

	return 0;
}

{'fraction_non_alphanumeric': 0.15172413793103448, 'fraction_numerical': 0.021182266009852218, 'mean_word_length': 3.870503597122302, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, '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': '6400266', 'n_tokens_mistral': 836, 'n_tokens_neox': 734, 'n_words': 245}