format code

This commit is contained in:
xianjimli 2019-02-04 18:04:19 +08:00
parent 47dd67d3cb
commit b207ccb565
2 changed files with 23 additions and 1 deletions

View File

@ -72,7 +72,7 @@ BEGIN_C_DECLS
* ```c
* widget_on(slide_menu, EVT_VALUE_CHANGED, on_current_changed, slide_menu);
* ```
*
*
*
* ```c

View File

@ -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);
}