Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockoS committed Sep 8, 2024
1 parent 37b7ba1 commit 956cf40
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@ jobs:
- name: Setup Dependencies
run: |
sudo apt install -y -qq libjansson-dev
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
- name: Configure
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
working-directory: ${{github.workspace}}
run: cmake -Bbuild -S . -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build
working-directory: ${{github.workspace}}/build
working-directory: ${{github.workspace}}
shell: bash
run: cmake --build . --config $BUILD_TYPE
run: cmake --build ./build --config $BUILD_TYPE

- name: Test
working-directory: ${{github.workspace}}/build
working-directory: ${{github.workspace}}
shell: bash
run: ctest -C $BUILD_TYPE
run: cmake --build ./build --target test
9 changes: 8 additions & 1 deletion test/comment.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ MunitResult comment_load_test(const MunitParameter params[] __attribute__((unuse
munit_assert_int(comment_repository_size(repository), ==, 0);

munit_assert_false(comment_repository_load(repository, "data/comment_1.json"));
munit_assert_int(comment_repository_size(repository), ==, 0);
munit_assert_int(comment_repository_size(repository), ==, 1);

munit_assert_true(comment_repository_get(repository, 0, &comment));
munit_assert_uint16(comment.logical, ==, 0xCAFEU);
munit_assert_uint8(comment.page, ==, 0x0AU);
munit_assert_string_equal(comment.text, "hello!");

comment_repository_destroy(repository);

munit_assert_true(comment_repository_load(repository, "data/comment_0.json"));
munit_assert_int(comment_repository_size(repository), ==, 2);
Expand Down

0 comments on commit 956cf40

Please sign in to comment.