Angband
Functions | Variables
parse.c File Reference
#include "unit-test.h"
#include "parser.h"

Functions

int setup_tests (void **state)
 
int teardown_tests (void *state)
 
int test_blank (void *state)
 
int test_spaces (void *state)
 
int test_comment0 (void *state)
 
int test_comment1 (void *state)
 
int test_priv (void *state)
 
int test_reg0 (void *state)
 
int test_reg1 (void *state)
 
int test_reg2 (void *state)
 
int test_reg3 (void *state)
 
int test_reg4 (void *state)
 
int test_reg5 (void *state)
 
int test_reg_int (void *state)
 
int test_reg_sym (void *state)
 
int test_reg_str (void *state)
 
static enum parser_error helper_sym0 (struct parser *p)
 
int test_sym0 (void *state)
 
static enum parser_error helper_sym1 (struct parser *p)
 
int test_sym1 (void *state)
 
static enum parser_error helper_int0 (struct parser *p)
 
int test_int0 (void *state)
 
static enum parser_error helper_int1 (struct parser *p)
 
int test_int1 (void *state)
 
static enum parser_error helper_str0 (struct parser *p)
 
int test_str0 (void *state)
 
int test_syntax0 (void *state)
 
int test_syntax1 (void *state)
 
int test_syntax2 (void *state)
 
int test_baddir (void *state)
 
static enum parser_error helper_rand0 (struct parser *p)
 
int test_rand0 (void *state)
 
static enum parser_error helper_rand1 (struct parser *p)
 
int test_rand1 (void *state)
 
static enum parser_error helper_opt0 (struct parser *p)
 
int test_opt0 (void *state)
 
static enum parser_error helper_uint0 (struct parser *p)
 
int test_uint0 (void *state)
 
int test_uint1 (void *state)
 
static enum parser_error helper_char0 (struct parser *p)
 
int test_char0 (void *state)
 
static enum parser_error helper_char1 (struct parser *p)
 
int test_char1 (void *state)
 

Variables

const char * suite_name = "parse/parser"
 
struct test tests []
 

Function Documentation

◆ helper_char0()

static enum parser_error helper_char0 ( struct parser p)
static

References parser_getchar(), and parser_priv().

Referenced by test_char0().

◆ helper_char1()

static enum parser_error helper_char1 ( struct parser p)
static

◆ helper_int0()

static enum parser_error helper_int0 ( struct parser p)
static

References parser_getint(), and parser_priv().

Referenced by test_int0().

◆ helper_int1()

static enum parser_error helper_int1 ( struct parser p)
static

References parser_getint(), and parser_priv().

Referenced by test_int1().

◆ helper_opt0()

static enum parser_error helper_opt0 ( struct parser p)
static

References NULL, parser_getsym(), parser_hasval(), parser_priv(), and s1.

Referenced by test_opt0().

◆ helper_rand0()

static enum parser_error helper_rand0 ( struct parser p)
static

◆ helper_rand1()

static enum parser_error helper_rand1 ( struct parser p)
static

◆ helper_str0()

static enum parser_error helper_str0 ( struct parser p)
static

References parser_getstr(), and parser_priv().

Referenced by test_str0().

◆ helper_sym0()

static enum parser_error helper_sym0 ( struct parser p)
static

References parser_getsym(), and parser_priv().

Referenced by test_sym0().

◆ helper_sym1()

static enum parser_error helper_sym1 ( struct parser p)
static

References parser_getsym(), and parser_priv().

Referenced by test_sym1().

◆ helper_uint0()

static enum parser_error helper_uint0 ( struct parser p)
static

References parser_getuint(), and parser_priv().

Referenced by test_uint0().

◆ setup_tests()

int setup_tests ( void **  state)

References p, and parser_new().

◆ teardown_tests()

int teardown_tests ( void state)

References parser_destroy().

◆ test_baddir()

int test_baddir ( void state)

References eq, ok, and parser_parse().

◆ test_blank()

int test_blank ( void state)

References eq, ok, and parser_parse().

◆ test_char0()

int test_char0 ( void state)

◆ test_char1()

int test_char1 ( void state)

◆ test_comment0()

int test_comment0 ( void state)

References eq, ok, and parser_parse().

◆ test_comment1()

int test_comment1 ( void state)

References eq, ok, and parser_parse().

◆ test_int0()

int test_int0 ( void state)

◆ test_int1()

int test_int1 ( void state)

◆ test_opt0()

int test_opt0 ( void state)

◆ test_priv()

int test_priv ( void state)

References ok, parser_priv(), parser_setpriv(), and ptreq.

◆ test_rand0()

int test_rand0 ( void state)

◆ test_rand1()

int test_rand1 ( void state)

◆ test_reg0()

int test_reg0 ( void state)

References eq, ignored(), ok, and parser_reg().

◆ test_reg1()

int test_reg1 ( void state)

References eq, ignored(), ok, and parser_reg().

◆ test_reg2()

int test_reg2 ( void state)

References eq, ignored(), ok, and parser_reg().

◆ test_reg3()

int test_reg3 ( void state)

References eq, ignored(), ok, and parser_reg().

◆ test_reg4()

int test_reg4 ( void state)

References eq, ignored(), ok, and parser_reg().

◆ test_reg5()

int test_reg5 ( void state)

References eq, ignored(), ok, and parser_reg().

◆ test_reg_int()

int test_reg_int ( void state)

References eq, ignored(), ok, and parser_reg().

◆ test_reg_str()

int test_reg_str ( void state)

References eq, ignored(), ok, and parser_reg().

◆ test_reg_sym()

int test_reg_sym ( void state)

References eq, ignored(), ok, and parser_reg().

◆ test_spaces()

int test_spaces ( void state)

References eq, ok, and parser_parse().

◆ test_str0()

int test_str0 ( void state)

◆ test_sym0()

int test_sym0 ( void state)

◆ test_sym1()

int test_sym1 ( void state)

◆ test_syntax0()

int test_syntax0 ( void state)

◆ test_syntax1()

int test_syntax1 ( void state)

◆ test_syntax2()

int test_syntax2 ( void state)

◆ test_uint0()

int test_uint0 ( void state)

◆ test_uint1()

int test_uint1 ( void state)

References eq, ignored(), ok, parser_parse(), and parser_reg().

Variable Documentation

◆ suite_name

const char* suite_name = "parse/parser"

◆ tests

struct test tests[]