mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
format code
This commit is contained in:
parent
47dd67d3cb
commit
b207ccb565
@ -72,7 +72,7 @@ BEGIN_C_DECLS
|
||||
* ```c
|
||||
* widget_on(slide_menu, EVT_VALUE_CHANGED, on_current_changed, slide_menu);
|
||||
* ```
|
||||
|
||||
*
|
||||
* 可按下面的方法关注当前按钮被点击的事件:
|
||||
*
|
||||
* ```c
|
||||
|
@ -78,3 +78,25 @@ TEST(Tokenizer, single_char_token) {
|
||||
|
||||
tokenizer_deinit(t);
|
||||
}
|
||||
|
||||
TEST(Tokenizer, until1) {
|
||||
tokenizer_t tokenizer;
|
||||
|
||||
tokenizer_t* t = tokenizer_init_ex(&tokenizer, "{a==1}", 100, "{ }", "=,");
|
||||
ASSERT_EQ(t, &tokenizer);
|
||||
|
||||
ASSERT_EQ(string(tokenizer_next_until(t, ",}")), string("a==1"));
|
||||
|
||||
tokenizer_deinit(t);
|
||||
}
|
||||
|
||||
TEST(Tokenizer, until2) {
|
||||
tokenizer_t tokenizer;
|
||||
|
||||
tokenizer_t* t = tokenizer_init_ex(&tokenizer, "{a==1, a}", 100, "{ }", "=,");
|
||||
ASSERT_EQ(t, &tokenizer);
|
||||
|
||||
ASSERT_EQ(string(tokenizer_next_until(t, ",}")), string("a==1"));
|
||||
|
||||
tokenizer_deinit(t);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user