Add p_context_delete() and p_tree_delete() for D targets
This commit is contained in:
1 parent
d440d0442d
commit
dd687d0299
11 files changed
+105
-24
No files matched your search
@@ -10,8 +10,7 @@ int main()
|
||||
unittest
|
||||
{
|
||||
string input = "abbccc";
|
||||
p_context_t * context;
|
||||
context = p_context_new(input);
|
||||
p_context_t * context = p_context_new(input);
|
||||
assert(p_parse(context) == P_SUCCESS);
|
||||
Start * start = p_result(context);
|
||||
|
||||
@@ -47,6 +46,8 @@ unittest
|
||||
assert_eq(1, start.end_position.row);
|
||||
assert_eq(6, start.end_position.col);
|
||||
|
||||
p_tree_delete(start);
|
||||
|
||||
input = "\n\n bb\nc\ncc\n\n a";
|
||||
context = p_context_new(input);
|
||||
assert(p_parse(context) == P_SUCCESS);
|
||||
@@ -83,4 +84,6 @@ unittest
|
||||
assert_eq(3, start.position.col);
|
||||
assert_eq(7, start.end_position.row);
|
||||
assert_eq(6, start.end_position.col);
|
||||
|
||||
p_tree_delete(start);
|
||||
}
|
||||
Reference in new issue
Block a user