Replace p_context_init() with p_context_new()/p_context_delete()
This commit is contained in:
1 parent
9f2fe6f84b
commit
6fd5186159
77 files changed
+728
-610
No files matched your search
@@ -10,10 +10,10 @@ int main()
|
||||
unittest
|
||||
{
|
||||
string input = "hi";
|
||||
p_context_t context;
|
||||
p_context_init(&context, input);
|
||||
assert_eq(P_SUCCESS, p_parse(&context));
|
||||
Top * top = p_result(&context);
|
||||
p_context_t * context;
|
||||
context = p_context_new(input);
|
||||
assert_eq(P_SUCCESS, p_parse(context));
|
||||
Top * top = p_result(context);
|
||||
assert(top.pToken !is null);
|
||||
assert_eq(TOKEN_hi, top.pToken.token);
|
||||
}
|
||||
Reference in new issue
Block a user