|
12 | 12 | * Copyright (C) 2024 Fossil Logic. All rights reserved. |
13 | 13 | * ----------------------------------------------------------------------------- |
14 | 14 | */ |
15 | | -#ifndef FOSSIL_TEST_CORE_H |
16 | | -#define FOSSIL_TEST_CORE_H |
17 | | - |
18 | | -#define MAX_NAME_LENGTH 256 |
19 | | - |
20 | | -// Color codes |
21 | | -#define FOSSIL_TEST_COLOR_RESET "\033[0m" // Reset |
22 | | -#define FOSSIL_TEST_COLOR_GREEN "\033[32m" // Green |
23 | | -#define FOSSIL_TEST_COLOR_RED "\033[31m" // Red |
24 | | -#define FOSSIL_TEST_COLOR_YELLOW "\033[33m" // Yellow |
25 | | -#define FOSSIL_TEST_COLOR_BLUE "\033[34m" // Blue |
26 | | -#define FOSSIL_TEST_COLOR_MAGENTA "\033[35m" // Magenta |
27 | | -#define FOSSIL_TEST_COLOR_CYAN "\033[36m" // Cyan |
28 | | -#define FOSSIL_TEST_COLOR_WHITE "\033[97m" // White |
29 | | -#define FOSSIL_TEST_COLOR_PURPLE "\033[35m" // Purple |
30 | | -#define FOSSIL_TEST_COLOR_ORANGE "\033[38;5;208m" // Orange |
31 | | - |
32 | | -#define FOSSIL_TEST_ATTR_BOLD "\033[1m" // Bold |
33 | | -#define FOSSIL_TEST_ATTR_DIM "\033[2m" // Dim |
34 | | -#define FOSSIL_TEST_ATTR_UNDERLINE "\033[4m" // Underline |
35 | | -#define FOSSIL_TEST_ATTR_ITALIC "\033[3m" // Italic |
36 | | - |
37 | | - |
38 | | -#include <setjmp.h> |
39 | | -#include <stddef.h> |
40 | | -#include <stdlib.h> |
41 | | -#include <stdio.h> |
42 | | -#include <string.h> |
43 | | -#include <stdbool.h> |
44 | | -#include <stdint.h> |
45 | | -#include <time.h> |
| 15 | +#ifndef FOSSIL_TEST_INTERNAL_H |
| 16 | +#define FOSSIL_TEST_INTERNAL_H |
| 17 | + |
| 18 | +#include "internal.h" |
46 | 19 |
|
47 | 20 | #ifdef __cplusplus |
48 | 21 | extern "C" { |
49 | 22 | #endif |
50 | 23 |
|
51 | | -/** |
52 | | - * @struct fossil_test_options_t |
53 | | - * @brief Structure to hold various options for fossil testing. |
54 | | - * |
55 | | - * This structure contains various flags and parameters that control the behavior of the fossil testing framework. |
56 | | - * |
57 | | - * @var fossil_test_options_t::show_version |
58 | | - * Flag to indicate if the version information should be displayed. |
59 | | - * |
60 | | - * @var fossil_test_options_t::show_help |
61 | | - * Flag to indicate if the help information should be displayed. |
62 | | - * |
63 | | - * @var fossil_test_options_t::show_info |
64 | | - * Flag to indicate if additional information should be displayed. |
65 | | - * |
66 | | - * @var fossil_test_options_t::reverse |
67 | | - * Flag to indicate if the order of tests should be reversed. |
68 | | - * |
69 | | - * @var fossil_test_options_t::repeat_enabled |
70 | | - * Flag to indicate if test repetition is enabled. |
71 | | - * |
72 | | - * @var fossil_test_options_t::repeat_count |
73 | | - * Number of times to repeat the tests if repetition is enabled. |
74 | | - * |
75 | | - * @var fossil_test_options_t::shuffle_enabled |
76 | | - * Flag to indicate if the tests should be shuffled. |
77 | | - * |
78 | | - * @var fossil_test_options_t::dry_run |
79 | | - * Flag to indicate if the tests should be run in dry-run mode (no actual execution). |
80 | | - * |
81 | | - */ |
82 | | -typedef struct { |
83 | | - bool show_version; |
84 | | - bool show_help; |
85 | | - bool show_info; |
86 | | - bool reverse; |
87 | | - bool repeat_enabled; |
88 | | - int32_t repeat_count; |
89 | | - bool shuffle_enabled; |
90 | | - bool dry_run; |
91 | | -} fossil_test_options_t; |
92 | | - |
93 | 24 | /** |
94 | 25 | * @enum test_status |
95 | 26 | * @brief Enumeration to represent the status of a test. |
@@ -364,8 +295,7 @@ void fossil_test_run_all(fossil_test_env_t *env); |
364 | 295 | */ |
365 | 296 | #define _FOSSIL_TEST_SKIP(test_name, message) \ |
366 | 297 | test_name##_test_case.status = TEST_STATUS_SKIP; \ |
367 | | - test_name##_test_case.failure_message = message; \ |
368 | | - printf(FOSSIL_TEST_COLOR_YELLOW "SKIPPED: %s - %s\n" FOSSIL_TEST_COLOR_RESET, #test_name, message); \ |
| 298 | + test_name##_test_case.failure_message = message; |
369 | 299 |
|
370 | 300 | /** |
371 | 301 | * @brief Macro to define a test case. |
|
0 commit comments