Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
f9979ee
rewire headers
dreamer-coding May 7, 2025
f02bf34
correct the license info
dreamer-coding May 7, 2025
84ab977
wire the internal source
dreamer-coding May 7, 2025
d179539
include pizza stream
dreamer-coding May 7, 2025
31c4e12
ensure stream is listed
dreamer-coding May 7, 2025
944df41
adding new tools
dreamer-coding May 7, 2025
52add97
rename base header from test to pizza
dreamer-coding May 7, 2025
9ec78d0
shorten names
dreamer-coding May 7, 2025
22f7b70
fix include paths and update source includes
dreamer-coding May 7, 2025
6ececb8
move stream
dreamer-coding May 7, 2025
0497b98
remove old color tags
dreamer-coding May 7, 2025
46576ab
resolve color tag namespace
dreamer-coding May 7, 2025
e082ced
rework header structure
dreamer-coding May 7, 2025
c64035f
complete internal utils
dreamer-coding May 7, 2025
91675d0
update cases and source
dreamer-coding May 7, 2025
08e9d20
update generator
dreamer-coding May 7, 2025
5f93192
make end return result
dreamer-coding May 7, 2025
cb5b7dd
fix macro interface
dreamer-coding May 7, 2025
ad30cd5
plant assume
dreamer-coding May 7, 2025
c223af6
update cases
dreamer-coding May 7, 2025
10a80fe
ensure common is the root
dreamer-coding May 7, 2025
d3e704b
apply c cpp
dreamer-coding May 7, 2025
4b19122
update summary
dreamer-coding May 8, 2025
f0c42f4
resolve realloc
dreamer-coding May 8, 2025
635367f
Update test.h
dreamer-coding May 8, 2025
f32e2b5
Update test.c
dreamer-coding May 8, 2025
0ecbbbc
Update test.c
dreamer-coding May 8, 2025
ca5ae34
Update mark.c
dreamer-coding May 8, 2025
e5eaec2
add safe operators
dreamer-coding May 8, 2025
a9e6f7a
use internal source
dreamer-coding May 8, 2025
cca380a
adding command pallet 3.0
dreamer-coding May 8, 2025
f1181e9
tag as unused param
dreamer-coding May 8, 2025
bfea32a
Update common.h
dreamer-coding May 8, 2025
f543da9
connect pallet
dreamer-coding May 8, 2025
c356736
adding ai and soap
dreamer-coding May 8, 2025
8f7bacc
using snprintf
dreamer-coding May 9, 2025
dfca2d2
update macros
dreamer-coding May 9, 2025
dc919fa
connect sanity empty shell
dreamer-coding May 9, 2025
dd538b7
simple command pallet
dreamer-coding May 9, 2025
80ec41e
pass argc and argv
dreamer-coding May 9, 2025
9186a8f
support flags for commands
dreamer-coding May 9, 2025
5b41871
apply some changes
dreamer-coding May 9, 2025
1c8a04a
add human to verbose
dreamer-coding May 9, 2025
fb5f241
add math
dreamer-coding May 9, 2025
92c5ba0
adding sub-help options
dreamer-coding May 9, 2025
26c684f
connect help
dreamer-coding May 9, 2025
9384f5e
connect color flag
dreamer-coding May 9, 2025
44ec1d9
small change for file no
dreamer-coding May 9, 2025
6b504b1
format dashboard
dreamer-coding May 9, 2025
7470264
adding host info
dreamer-coding May 9, 2025
bcd4961
update readme
dreamer-coding May 9, 2025
5390036
more subhelp messages
dreamer-coding May 10, 2025
2fdda46
add internal bdd messages and apply style to summary
dreamer-coding May 10, 2025
b5b8a27
added given when then internal messaging
dreamer-coding May 10, 2025
8a16312
adding assumtions for pointer operators
dreamer-coding May 10, 2025
95a1ba8
adding assumtions for char type
dreamer-coding May 10, 2025
1d6f44e
lock output for BDD for now
dreamer-coding May 10, 2025
25c45f3
connect subhelp for threads
dreamer-coding May 10, 2025
3fe185b
add metadata
dreamer-coding May 10, 2025
97e1a95
extract test case logic from test suite logic
dreamer-coding May 10, 2025
99a055b
cleanup header
dreamer-coding May 10, 2025
b3c2b1b
add flags
dreamer-coding May 10, 2025
1624313
extract update score from run test
dreamer-coding May 10, 2025
a7c78f7
add new targets
dreamer-coding May 11, 2025
83c551a
update Meson CI
dreamer-coding May 11, 2025
3297495
split summary logic into three
dreamer-coding May 11, 2025
03e9897
remove images
dreamer-coding May 11, 2025
6ca36de
update ci file
dreamer-coding May 11, 2025
2def9cd
remove unused enum human
dreamer-coding May 11, 2025
2847447
connect theme and verbose settings
dreamer-coding May 11, 2025
55f13b8
update ci file to use ci arg for verbose
dreamer-coding May 11, 2025
e7fc48a
fix ci file
dreamer-coding May 11, 2025
42843c2
remove thread command
dreamer-coding May 11, 2025
b2a68d2
use flag for verbose and theme
dreamer-coding May 11, 2025
0ab6e5b
connect run command
dreamer-coding May 11, 2025
4030619
adding tags and criteria
dreamer-coding May 11, 2025
8b32d39
fix color coding for google theme
dreamer-coding May 11, 2025
6ada8c9
add FOSSIL_TEST_SET_CRITERIA
dreamer-coding May 11, 2025
e025109
from SKIP macro
dreamer-coding May 11, 2025
756fe9d
add predected result
dreamer-coding May 12, 2025
645f239
more pizza string magic
dreamer-coding May 12, 2025
345b7cb
switch wstr assumtions for new assumtions
dreamer-coding May 12, 2025
340d769
update readme
dreamer-coding May 12, 2025
f64ad28
added valid tags and criteria list
dreamer-coding May 12, 2025
69cb49a
remove wstring and wchar test cases
dreamer-coding May 12, 2025
bf32007
connect score system
dreamer-coding May 12, 2025
00e8da2
color theme
dreamer-coding May 12, 2025
3195357
handle criteria values
dreamer-coding May 12, 2025
8d545cb
move pizza type into mock
dreamer-coding May 12, 2025
2f46e1a
resolve boolean check for skipped test
dreamer-coding May 12, 2025
cc0970b
update readme
dreamer-coding May 12, 2025
d459826
name executable pizza
dreamer-coding May 12, 2025
9eb950f
add todos and clean up command-line help output
dreamer-coding May 12, 2025
a89523c
bump to 1.2.1
dreamer-coding May 12, 2025
18e3030
update for new mock tofu block logic
dreamer-coding May 12, 2025
496a933
connect new mock type
dreamer-coding May 12, 2025
0677ee7
add temp list of deprecated macros
dreamer-coding May 12, 2025
5699206
add old test suite to temp list of deprecated macros
dreamer-coding May 12, 2025
0f40a3a
split macros into public and private
dreamer-coding May 12, 2025
ba8f359
ensure criteria name points to name
dreamer-coding May 12, 2025
a50cb93
define sanity
dreamer-coding May 12, 2025
55c8230
small changes to help info
dreamer-coding May 12, 2025
3fbd0eb
clean mock comments
dreamer-coding May 12, 2025
54158da
resolve issues with sanity kit
dreamer-coding May 12, 2025
599bec2
resolve mock so it can handle the new pizza type
dreamer-coding May 12, 2025
9bea8cc
use sleep insted of usleep
dreamer-coding May 12, 2025
57dabca
update test cases for mock
dreamer-coding May 12, 2025
40929d0
add sanity test
dreamer-coding May 12, 2025
023ab20
fix bug where mock did not ensure zero args case
dreamer-coding May 12, 2025
7f143de
small change for windows side of file exist
dreamer-coding May 12, 2025
363429e
move #include <sys/stat.h> into common
dreamer-coding May 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 7 additions & 48 deletions .github/workflows/meson_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,8 @@ jobs:
- name: Configure
run: meson setup builddir_msvc_${{ matrix.msvc_version }} --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3

- name: Compile
run: meson compile -C builddir_msvc_${{ matrix.msvc_version }}

- name: Run Tests
run: meson test -C builddir_msvc_${{ matrix.msvc_version }} -v --test-arg='summary ci'

- name: Upload Test Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: windows_msvc_${{ matrix.msvc_version }}_meson_testlog
path: builddir_msvc_${{ matrix.msvc_version }}/meson-logs/testlog.txt
run: meson test -C builddir_msvc_${{ matrix.msvc_version }} -v --test-args='verbose=ci'

build_macosx:
name: Building on macOS with Xcode ${{ matrix.xcode_version }}
Expand Down Expand Up @@ -96,18 +86,8 @@ jobs:
- name: Configure
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3

- name: Compile
run: meson compile -C builddir

- name: Run Tests
run: meson test -C builddir -v --test-arg='summary ci'

- name: Upload Test Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: macos_xcode_${{ matrix.xcode_version }}_meson_testlog
path: builddir/meson-logs/testlog.txt
run: meson test -C builddir -v --test-args='verbose=ci'

build_msys:
name: Building on MSYS ${{ matrix.architecture }}
Expand Down Expand Up @@ -143,18 +123,8 @@ jobs:
- name: Configure
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3

- name: Compile
run: meson compile -C builddir

- name: Run Tests
run: meson test -C builddir -v --test-arg='summary ci'

- name: Upload Test Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: msys_${{ matrix.architecture }}_meson_testlog
path: builddir/meson-logs/testlog.txt
run: meson test -C builddir -v --test-args='verbose=ci'

build_mingw:
name: Building on MinGW ${{ matrix.architecture }}
Expand Down Expand Up @@ -194,18 +164,8 @@ jobs:
- name: Configure
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3

- name: Compile
run: meson compile -C builddir

- name: Run Tests
run: meson test -C builddir -v --test-arg='summary ci'

- name: Upload Test Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: mingw_${{ matrix.architecture }}_meson_testlog
path: builddir/meson-logs/testlog.txt
run: meson test -C builddir -v --test-args='verbose=ci'

build_posix:
name: Build on Linux ${{ matrix.distro }}
Expand Down Expand Up @@ -247,8 +207,7 @@ jobs:
/bin/bash -c "
sudo apt update
meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
meson compile -C builddir
meson test -C builddir -v --test-arg='summary ci'"
meson test -C builddir -v --test-args='verbose=ci'"

build_cross:
name: Building on Bedrock ${{ matrix.architecture }}
Expand Down Expand Up @@ -342,9 +301,9 @@ jobs:

- name: Build the Project
run: |
meson compile -C builddir -v
meson compile -C builddir

- name: Test the Project
run: |
meson test -C builddir -v --test-arg='summary ci'
meson test -C builddir -v --test-args='verbose=ci'

82 changes: 50 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,17 @@
# ***Fossil Test by Fossil Logic***

**Fossil Test** is a powerful and flexible unit testing, mocking, and benchmarking suite developed by Fossil Logic to ensure the reliability, clarity, and performance of **C**, **C++**, and **Python** projects. Supporting multiple development methodologies—including Behavior-Driven Development (BDD), Domain-Driven Design (DDD), and Test-Driven Development (TDD)—Fossil Test offers a versatile foundation for building high-quality, maintainable test suites across diverse workflows. Starting with version 1.1.8, it integrates **Jellyfish AI**, an intelligent system designed to apply AI where it makes sense—enhancing test coverage insights, feedback clarity, and overall developer experience.

The Fossil suite consists of three complementary frameworks to streamline the development and testing process:

- **Fossil Test**: The core unit testing framework that enables developers to create, manage, and execute unit tests effectively, ensuring each component functions as expected.
- **Fossil Mock**: A dedicated mocking library that simulates complex dependencies. Using mock objects, developers can isolate and thoroughly test individual components, improving the precision and reliability of test coverage.
- **Fossil Mark**: A benchmarking tool that provides detailed performance insights by measuring execution time, identifying bottlenecks, and offering in-depth reporting to optimize code efficiency.

Together, **Fossil Test**, **Fossil Mock**, and **Fossil Mark** — now supercharged with **Jellyfish AI** — offer a powerful, integrated toolkit for developing, testing, and optimizing robust software, making them an essential asset for developers committed to quality and performance.

---

## **Key Features**
**Fossil Test** is a comprehensive suite for unit testing, mocking, and benchmarking, designed by Fossil Logic to enhance the reliability, clarity, and performance of **C**, **C++**, and **Python** projects. Supporting methodologies like Behavior-Driven Development (BDD), Domain-Driven Design (DDD), and Test-Driven Development (TDD), it caters to diverse workflows with features such as a robust Command-Line Interface (CLI), advanced mocking tools, integrated benchmarking, and parallel test execution. With additional capabilities like customizable output themes, tag-based test filtering, and detailed performance insights, **Fossil Test**, alongside **Fossil Mock**, **Fossil Mark**, and **Fossil Sanity Kit** for testing command-line operations, forms a powerful toolkit for building, testing, and optimizing high-quality, maintainable software.

| Feature | Description |
|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| **Jellyfish AI Integration** | Intelligent assistant for analyzing test coverage, diagnostics, and improving test clarity (available from v1.1.8 onward). |
| **BDD, DDD, and TDD Support** | Supports Behavior-Driven, Domain-Driven, and Test-Driven Development styles, catering to various project methodologies. |
| **Comprehensive Unit Testing** | A full suite of tools for creating, managing, and executing unit tests, ensuring that individual units of code behave as expected. |
| **Mocking Capabilities** | Powerful mocking features allow developers to simulate complex dependencies, ensuring focused and reliable unit tests. |
| **Performance Tracking** | Measures and reports the performance of each test case, helping developers optimize test execution time and performance. |
| **Command-Line Interface (CLI)** | A powerful CLI for running tests, generating reports, and managing the test suite, supporting automation and integration workflows. |

---

*Note: Jellyfish AI is developed as part of the Fossil Logic ecosystem and is tightly integrated with Fossil Test to offer non-intrusive, intelligent guidance throughout the testing process.*
| **Command-Line Interface (CLI)** | A robust CLI for executing tests, managing test suites, and generating reports, enabling seamless automation and integration workflows. |
| **Support for Multiple Testing Styles** | Fully compatible with Behavior-Driven Development (BDD), Domain-Driven Design (DDD), and Test-Driven Development (TDD) methodologies. |
| **Mocking Capabilities** | Advanced mocking tools to simulate complex dependencies, ensuring isolated and precise unit testing. |
| **Benchmarking Tools** | Integrated benchmarking features to measure execution time, identify bottlenecks, and optimize code performance. |
| **Sanity Kit for Command Tests** | A specialized suite for validating command-line tools and scripts, ensuring consistent behavior across environments. |
| **Customizable Output Themes** | Multiple output themes (e.g., fossil, catch, doctest) to tailor the appearance of test results. |
| **Tag-Based Test Filtering** | Organize and execute tests based on custom tags for better test management. |
| **Detailed Performance Insights** | Comprehensive reporting on test execution times and resource usage to aid in performance optimization. |

---

Expand Down Expand Up @@ -57,7 +43,7 @@ To get started with Fossil Test, ensure you have the following installed:
# ======================
[wrap-git]
url = https://github.com/fossillogic/fossil-test.git
revision = v1.2.0
revision = v1.2.1

[provide]
fossil-test = fossil_test_dep
Expand All @@ -83,14 +69,46 @@ The Fossil Test CLI provides an efficient way to run and manage tests directly f
|----------------------------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| `--version` | Displays the current version of Fossil Test. | Useful for verifying the version of the tool in use. |
| `--help` | Shows help message with usage instructions. | Provides a quick reference for all available commands. |
| `--info` | Displays detailed information about the test run. | Includes information such as test count, duration, and configuration. |
| `reverse [enable/disable]` | Enables or disables reverse order of test execution. | Useful for debugging or ensuring the tests don't depend on execution order. |
| `shuffle [enable/disable]` | Enables or disables shuffling of test execution order. | Helps identify order-dependent issues in the test suite. |
| `dry-run [enable/disable]` | Enables or disables dry run mode, showing which tests will execute without running them. | Ideal for verifying test selection criteria before actual execution. |
| `repeat <number>` | Repeats the test suite a specified number of times. | Handy for stress-testing or reproducing intermittent failures. |
| `color [enable/disable]` | Enables or disables colored output. | Enhances readability in supported terminals. |
| `format <plain, ci, jellyfish>` | Selects the output format for test results. | Affects how test data is displayed; useful for visual or machine-parsed output. |
| `summary <plain, ci, jellyfish>` | Sets the level of summary output after test execution. | `ci` is minimal, `jellyfish` is smart test mode, and `plain` is default classic. |
| `--dry-run` | Perform a dry run without executing commands. | Ideal for verifying test selection criteria before actual execution. |
| `--host` | Shows info about the current host system. | Useful for looking up system you are running test on. |
| `run` | Execute tests with optional parameters. | Supports additional options like `--fail-fast` and `--repeat`. |
| `filter` | Filter tests based on criteria. | Options include filtering by test name, suite name, or tags. |
| `sort` | Sort tests by specified criteria. | Allows sorting in ascending or descending order. |
| `shuffle` | Shuffle tests with optional parameters. | Includes options for specifying a seed or shuffle criteria. |
| `color=<mode>` | Set color mode (enable, disable, auto). | Enhances readability in supported terminals. |
| `theme=<name>` | Set the theme (fossil, catch, doctest, etc.). | Customizes the appearance of test output. |
| `verbose=<level>` | Set verbosity level (plain, ci, doge). | Adjusts the level of detail in test output. |

### Run Command Options
| Option | Description | Notes |
|----------------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| `--fail-fast` | Stop on the first failure. | Useful for quickly identifying and addressing critical issues. |
| `--only <test>` | Run only the specified test. | Focuses execution on a single test for debugging or validation purposes. |
| `--repeat <count>` | Repeat the test a specified number of times. | Useful for stress testing or verifying consistency across multiple runs. |
| `--help` | Show help for the run command. | Provides detailed usage instructions for the `run` command. |

### Filter Command Options
| Option | Description | Notes |
|----------------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| `--test-name <name>` | Filter by test name. | Enables precise targeting of individual tests. |
| `--suite-name <name>`| Filter by suite name. | Useful for running all tests within a specific suite. |
| `--tag <tag>` | Filter by tag. | Allows grouping and execution of tests based on custom tags. |
| `--help` | Show help for the filter command. | Provides detailed usage instructions for the `filter` command. |

### Sort Command Options
| Option | Description | Notes |
|----------------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| `--by <criteria>` | Sort by specified criteria. | Common criteria include execution time, name, or priority. |
| `--order <asc/desc>` | Sort in ascending or descending order. | Helps organize test execution based on preferred order. |
| `--help` | Show help for the sort command. | Provides detailed usage instructions for the `sort` command. |

### Shuffle Command Options
| Option | Description |
|----------------------|-----------------------------------------------------------------------------------------------|
| `--seed <seed>` | Specify the seed for shuffling. |
| `--count <count>` | Number of items to shuffle. |
| `--by <criteria>` | Shuffle by specified criteria. |
| `--help` | Show help for the shuffle command. |

## Configure Build Options

Expand Down
Loading
Loading