fix: hectic C: impruve logging guidelines

This commit is contained in:
2025-04-07 05:26:30 +00:00
parent 11150151f9
commit 98a26f1f61
9 changed files with 1205 additions and 122 deletions

View File

@@ -26,7 +26,7 @@
} while(0)
int main(void) {
set_output_color_mode(COLOR_MODE_DISABLE);
logger_level(LOG_LEVEL_DEBUG);
TEST_RAISE_GENERIC(raise_debug, LOG_LEVEL_DEBUG, "DEBUG");
TEST_RAISE_GENERIC(raise_log, LOG_LEVEL_LOG, "LOG");
@@ -35,6 +35,6 @@ int main(void) {
TEST_RAISE_GENERIC(raise_warn, LOG_LEVEL_WARN, "WARN");
TEST_RAISE_GENERIC(raise_exception, LOG_LEVEL_EXCEPTION, "EXCEPTION");
printf("%s all tests passed.\n", __FILE__);
printf("%s%s all tests passed.%s\n", OPTIONAL_COLOR(COLOR_GREEN), __FILE__, OPTIONAL_COLOR(COLOR_RESET));
return 0;
}

View File

@@ -91,7 +91,6 @@ void test_arena_overwrite_detection() {
}
int main() {
set_output_color_mode(COLOR_MODE_DISABLE);
logger_level(LOG_LEVEL_DEBUG);
test_arena_init();
@@ -102,5 +101,5 @@ int main() {
test_arena_strdup();
test_arena_repstr();
test_arena_overwrite_detection();
printf("%s all tests passed.\n", __FILE__);
printf("%s%s all tests passed.%s\n", OPTIONAL_COLOR(COLOR_GREEN), __FILE__, OPTIONAL_COLOR(COLOR_RESET));
}

View File

@@ -124,6 +124,8 @@ static void test_arena_reset_reuse(void) {
}
int main(void) {
logger_level(LOG_LEVEL_DEBUG);
test_parse_json_object();
test_parse_json_number();
test_parse_json_string();
@@ -134,6 +136,6 @@ int main(void) {
test_nested_json_object();
test_arena_reset_reuse();
printf("%s all tests passed.\n", __FILE__);
printf("%s%s all tests passed.%s\n", OPTIONAL_COLOR(COLOR_GREEN), __FILE__, OPTIONAL_COLOR(COLOR_RESET));
return 0;
}

View File

@@ -83,7 +83,6 @@ void test_slice_string() {
}
int main() {
set_output_color_mode(COLOR_MODE_DISABLE);
logger_level(LOG_LEVEL_DEBUG);
test_slice_create();
@@ -92,6 +91,6 @@ int main() {
test_slice_edge_cases();
test_slice_string();
printf("%s all tests passed.\n", __FILE__);
printf("%s%s all tests passed.%s\n", OPTIONAL_COLOR(COLOR_GREEN), __FILE__, OPTIONAL_COLOR(COLOR_RESET));
return 0;
}