Skip to content

Commit

Permalink
refactor: clear compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Dec 9, 2023
1 parent a1f45b7 commit 514cbd5
Show file tree
Hide file tree
Showing 5 changed files with 352 additions and 348 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '2.5.3'

- name: Update git submodule
run: |
Expand Down Expand Up @@ -98,7 +100,7 @@ jobs:
xmake package
xmake install -o dist/lcui-package
- name: Package exmaples
- name: Package examples
run: |
cd examples
xmake -P . -v -y
Expand All @@ -122,7 +124,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.xmake/.cache/packages
key: ${{ runner.os }}-xmake-pacages
key: ${{ runner.os }}-xmake-packages

release:
if: startsWith(github.ref, 'refs/tags/v')
Expand Down
2 changes: 1 addition & 1 deletion lib/css/tests/test_css_computed.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static void check_length(const char *str, css_numeric_value_t actual,
ctest_equal_int(str, (int)actual, (int)expected);
}

static test_button_focus_style(void)
static void test_button_focus_style(void)
{
css_selector_t *selector;
css_style_decl_t *result;
Expand Down
16 changes: 8 additions & 8 deletions lib/i18n/tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,29 @@ void test_i18n(void)

i18n_change_language(L"en");

ctest_equal_bool("i18n_translate(L\"name\") == L\"English\")",
ctest_equal_bool("en: i18n_translate(L\"name\") == L\"English\")",
wcscmp(i18n_translate(L"name"), L"English") == 0,
true);

ctest_equal_bool("i18n_translate(L\"button.ok\") == L\"Ok\")",
ctest_equal_bool("en: i18n_translate(L\"button.ok\") == L\"Ok\")",
wcscmp(i18n_translate(L"button.ok"), L"Ok") == 0,
true);

ctest_equal_bool("i18n_translate(L\"button.notfound\") == NULL)",
ctest_equal_bool("en: i18n_translate(L\"button.notfound\") == NULL)",
i18n_translate(L"button.notfound")== NULL,
true);

i18n_change_language(L"zh-CN");

ctest_equal_bool("i18n_translate(L\"name\") == L\"中文\")",
wcscmp(i18n_translate(L"name"), L"中文") == 0,
ctest_equal_bool("zh-CN: i18n_translate(L\"name\")",
wcscmp(i18n_translate(L"name"), L"\u4E2D\u6587") == 0,
true);

ctest_equal_bool("i18n_translate(L\"button.ok\") == L\"确定\")",
wcscmp(i18n_translate(L"button.ok"), L"确定") == 0,
ctest_equal_bool("zh-CN: i18n_translate(L\"button.ok\")",
wcscmp(i18n_translate(L"button.ok"), L"\u786E\u5B9A") == 0,
true);

ctest_equal_bool("i18n_translate(L\"button.notfound\") == NULL)",
ctest_equal_bool("zh-CN: i18n_translate(L\"button.notfound\") == NULL",
i18n_translate(L"button.notfound")== NULL,
true);
i18n_clear();
Expand Down
Loading

0 comments on commit 514cbd5

Please sign in to comment.