{"id":27425867,"url":"https://github.com/mstanimirovic/testify.h","last_synced_at":"2026-05-09T04:31:41.396Z","repository":{"id":218092124,"uuid":"745213154","full_name":"mstanimirovic/testify.h","owner":"mstanimirovic","description":"testify.h is a simple C++ header file providing a lightweight testing framework for writing and running tests in C++ projects.","archived":false,"fork":false,"pushed_at":"2024-02-05T11:53:37.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-18T00:40:45.818Z","etag":null,"topics":["build","cmake","cpp","linux","test","test-framework","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mstanimirovic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-18T21:27:27.000Z","updated_at":"2024-01-19T16:23:20.000Z","dependencies_parsed_at":"2024-02-05T12:50:05.568Z","dependency_job_id":null,"html_url":"https://github.com/mstanimirovic/testify.h","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.2857142857142857,"last_synced_commit":"f67373c46c44c4a34e59452d8867709cb281cca0"},"previous_names":["m1ad3n/testify.h","mstanimirovic/testify.h"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mstanimirovic/testify.h","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstanimirovic%2Ftestify.h","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstanimirovic%2Ftestify.h/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstanimirovic%2Ftestify.h/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstanimirovic%2Ftestify.h/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mstanimirovic","download_url":"https://codeload.github.com/mstanimirovic/testify.h/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstanimirovic%2Ftestify.h/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","cmake","cpp","linux","test","test-framework","windows"],"created_at":"2025-04-14T12:29:21.741Z","updated_at":"2026-05-09T04:31:41.378Z","avatar_url":"https://github.com/mstanimirovic.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# testify.h - Lightweight C++ Testing Framework\n\n## Overview\n\n`testify.h` is a simple C++ header file providing a lightweight testing framework for writing and running tests in C++ projects. It includes functionality for defining and running tests, as well as asserting test conditions.\n\n## Features\n\n- Easy test definition using the `add_test` macro.\n- Assertion support through the `assert` macro.\n- Cross-platform colorized output for test results.\n- Symbolic representation of pass and fail status.\n\n## Usage\n\n### Test Definition\n\nTests are defined using the `add_test` macro, which takes a test function as an argument. For example:\n\n```cpp\nadd_test(my_test_function);\n```\n\nThis will create a test instance with the given function and run it.\n\n### Assertions\n\nAssertions are made using the assert macro, comparing the actual result (got) with the expected result (wanted). For example:\n\n```cpp\nassert(my_value, 42);\n```\n\nThis will return true if my_value is equal to 42, otherwise, it returns false.\n\n## Platform-Specific Notes\n### Linux\n\n- Text color is utilized for test result visualization.\n- Green color represents a passing test.\n- Red color represents a failing test.\n\n### Windows\n\n- Console text attributes are used for colorizing text.\n- Green text represents a passing test.\n- Red text represents a failing test.\n\n## Example\n\n```cpp\n#include \"testify.h\"\n\nbool my_test_function() {\n    // Your test logic here\n    assert(result, wanted_result);\n    \n    // or you can return the value\n    // return true;\n}\n\nint main() {\n    add_test(my_test_function);\n    return 0;\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstanimirovic%2Ftestify.h","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmstanimirovic%2Ftestify.h","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstanimirovic%2Ftestify.h/lists"}