<commit_before>#include "test_parser_p.h"

void empty_success(void **state) {
  grammar_t *grammar = grammar_init(
    non_terminal("Start"),
    rule_init("Start", empty()), 1);

  parse_t *result = parse("hello", grammar);
  assert_non_null(result);
  assert_int_equal(result->length, 0);
  assert_int_equal(result->n_children, 0);
}<commit_msg>Use new API on empty tests<commit_after>#include "test_parser_p.h"

void empty_success(void **state) {
  grammar_t *grammar = grammar_init(
    non_terminal("Start"),
    rule_init("Start", empty()), 1);

  parse_result_t *result = parse("hello", grammar);
  assert_non_null(result);

  parse_t *suc = result->data.result;
  assert_int_equal(suc->length, 0);
  assert_int_equal(suc->n_children, 0);
}
{'fraction_non_alphanumeric': 0.15261044176706828, 'fraction_numerical': 0.008032128514056224, 'mean_word_length': 5.862385321100917, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '1845578', 'n_tokens_mistral': 282, 'n_tokens_neox': 262, 'n_words': 50}