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
@@ -9,13 +9,13 @@ int main()
|
||||
unittest
|
||||
{
|
||||
string input = `abc.def`;
|
||||
p_context_t context;
|
||||
p_context_init(&context, input);
|
||||
assert(p_parse(&context) == P_SUCCESS);
|
||||
p_context_t * context;
|
||||
context = p_context_new(input);
|
||||
assert(p_parse(context) == P_SUCCESS);
|
||||
writeln("pass1");
|
||||
|
||||
input = `abc . abc`;
|
||||
p_context_init(&context, input);
|
||||
assert(p_parse(&context) == P_SUCCESS);
|
||||
context = p_context_new(input);
|
||||
assert(p_parse(context) == P_SUCCESS);
|
||||
writeln("pass2");
|
||||
}
|
||||
Reference in new issue
Block a user