Rename p_free_tree() to p_tree_delete()
This commit is contained in:
1 parent
6fd5186159
commit
ff61dd05d9
17 files changed
+50
-44
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#include "testparser.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "testutils.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
char const * input = "ab";
|
||||
p_context_t * context;
|
||||
context = p_context_new((uint8_t const *)input, strlen(input));
|
||||
assert_eq(P_SUCCESS, p_parse(context));
|
||||
Start * start = p_result(context);
|
||||
assert(start->a != NULL);
|
||||
assert(*start->a->pvalue == 1);
|
||||
assert(start->b != NULL);
|
||||
assert(*start->b->pvalue == 2);
|
||||
|
||||
p_tree_delete(start);
|
||||
p_context_delete(context);
|
||||
}
|
||||
Reference in new issue
Block a user