mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
improve tests
This commit is contained in:
parent
238db85e61
commit
f51e344b39
@ -136,3 +136,21 @@ TEST(Tokenizer, expr4) {
|
||||
|
||||
tokenizer_deinit(t);
|
||||
}
|
||||
|
||||
TEST(Tokenizer, expr5) {
|
||||
tokenizer_t tokenizer;
|
||||
|
||||
tokenizer_t* t = tokenizer_init_ex(&tokenizer, "{a, name=aaa}", 100, "{}", "=,");
|
||||
ASSERT_EQ(string(tokenizer_next_expr_until(t, ",}")), string("a"));
|
||||
|
||||
tokenizer_deinit(t);
|
||||
}
|
||||
|
||||
TEST(Tokenizer, expr6) {
|
||||
tokenizer_t tokenizer;
|
||||
|
||||
tokenizer_t* t = tokenizer_init_ex(&tokenizer, "{(a+b), name=aaa}", 100, "{}", "=,");
|
||||
ASSERT_EQ(string(tokenizer_next_expr_until(t, ",}")), string("(a+b)"));
|
||||
|
||||
tokenizer_deinit(t);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user