#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);
}

#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);
}

Use new API on empty tests
Use new API on empty tests
