MCPcopy Create free account
hub / github.com/codr7/hacktical-c / read_call_tests

Function read_call_tests

dsl/tests.c:5–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "dsl.h"
4
5static void read_call_tests() {
6 struct hc_sloc sloc = hc_sloc("read_call_tests", 0, 0);
7
8 struct hc_list out;
9 hc_list_init(&out);
10 hc_defer(hc_forms_free(&out));
11
12 const char *s = "( foo bar )";
13 const char *in = s;
14 assert(hc_read_expr(&in, &out, &sloc));
15
16 struct hc_form *f = hc_baseof(out.next, struct hc_form, owner);
17 assert(f->type == &HC_CALL_FORM);
18}
19
20static void read_id_tests() {
21 struct hc_sloc sloc = hc_sloc("read_id_tests", 0, 0);

Callers 1

dsl_testsFunction · 0.85

Calls 4

hc_list_initFunction · 0.85
hc_forms_freeFunction · 0.85
hc_read_exprFunction · 0.85
hc_slocClass · 0.70

Tested by

no test coverage detected