mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
fix tests
This commit is contained in:
parent
01a13f401c
commit
f0e2c940d0
@ -114,3 +114,17 @@ TEST(Path, approot) {
|
||||
ASSERT_EQ(path_build(result, sizeof(result), app_root, "bin", NULL), RET_OK);
|
||||
ASSERT_EQ(path_exist(result), TRUE);
|
||||
}
|
||||
|
||||
TEST(Path, replace_basename) {
|
||||
const char* filename = "a/b/test.txt";
|
||||
char result[MAX_PATH + 1];
|
||||
ASSERT_EQ(path_replace_basename(result, sizeof(result), filename, "abc.txt"), RET_OK);
|
||||
ASSERT_STREQ(result, "a/b/abc.txt");
|
||||
}
|
||||
|
||||
TEST(Path, replace_extname) {
|
||||
const char* filename = "a/b/test.txt";
|
||||
char result[MAX_PATH + 1];
|
||||
ASSERT_EQ(path_replace_extname(result, sizeof(result), filename, "abc"), RET_OK);
|
||||
ASSERT_STREQ(result, "a/b/test.abc");
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ TEST(Slider, event) {
|
||||
|
||||
slider->dragging = TRUE;
|
||||
slider_set_value(w, 20);
|
||||
ASSERT_EQ(s_log, "will_change;change;");
|
||||
ASSERT_EQ(s_log, "");
|
||||
slider->dragging = FALSE;
|
||||
|
||||
widget_destroy(w);
|
||||
|
Loading…
Reference in New Issue
Block a user