Skip to content

Commit

Permalink
Merge branch 'main' into unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcransome authored Mar 26, 2024
2 parents 19549e9 + 5cbf920 commit 17d7c14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void flog_version() {}
static void
flog_config_new_with_zero_arg_count_fails(void **state) {
FlogError error; // should pass non-null assertion (&error)
int mock_argc = 0; // should fail >0 assertion
int mock_argc = 0; // should fail >1 assertion
char *mock_argv[] = {}; // should pass non-null assertion

expect_assert_failure(flog_config_new(mock_argc, mock_argv, &error));
Expand All @@ -84,14 +84,14 @@ flog_config_new_with_zero_arg_count_fails(void **state) {
static void
flog_config_new_with_null_arg_values_fails(void **state) {
FlogError error; // should pass non-null assertion (&error)
int mock_argc = 1; // should pass >0 assertion
int mock_argc = 2; // should pass >1 assertion
char **mock_argv = NULL; // should fail non-null assertion

expect_assert_failure(flog_config_new(mock_argc, mock_argv, &error));
}

static void test_new_config_with_no_error_ptr_calls_assert(void **state) {
int mock_argc = 1; // should pass >0 assertion
int mock_argc = 2; // should pass >1 assertion
char *mock_argv[] = {}; // should pass non-null assertion

expect_assert_failure(flog_config_new(mock_argc, mock_argv, NULL));
Expand Down

0 comments on commit 17d7c14

Please sign in to comment.