{"id":22229597,"url":"https://github.com/0rayn/jt","last_synced_at":"2026-02-09T16:02:48.965Z","repository":{"id":252081772,"uuid":"833674655","full_name":"0rayn/Jt","owner":"0rayn","description":"Just-Test is your Test-Harness software made in C for C","archived":false,"fork":false,"pushed_at":"2024-08-07T14:26:43.000Z","size":136,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-31T04:41:20.324Z","etag":null,"topics":["c-language","test-automation","test-harnesses","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0rayn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-07-25T14:14:40.000Z","updated_at":"2024-08-16T15:18:05.000Z","dependencies_parsed_at":"2024-08-07T16:40:02.638Z","dependency_job_id":null,"html_url":"https://github.com/0rayn/Jt","commit_stats":null,"previous_names":["ayg0/jt","0rayn/jt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0rayn/Jt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0rayn%2FJt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0rayn%2FJt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0rayn%2FJt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0rayn%2FJt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0rayn","download_url":"https://codeload.github.com/0rayn/Jt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0rayn%2FJt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29271859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T13:47:44.167Z","status":"ssl_error","status_checked_at":"2026-02-09T13:47:43.721Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c-language","test-automation","test-harnesses","unit-testing"],"created_at":"2024-12-03T01:11:09.077Z","updated_at":"2026-02-09T16:02:48.646Z","avatar_url":"https://github.com/0rayn.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n     ██╗██╗   ██╗███████╗████████╗              ████████╗███████╗███████╗████████╗\n     ██║██║   ██║██╔════╝╚══██╔══╝              ╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝\n     ██║██║   ██║███████╗   ██║       █████╗       ██║   █████╗  ███████╗   ██║   \n██   ██║██║   ██║╚════██║   ██║       ╚════╝       ██║   ██╔══╝  ╚════██║   ██║   \n╚█████╔╝╚██████╔╝███████║   ██║                    ██║   ███████╗███████║   ██║   \n ╚════╝  ╚═════╝ ╚══════╝   ╚═╝                    ╚═╝   ╚══════╝╚══════╝   ╚═╝   \n```\nJust-Test or Jt for short is your test-harness made in C for C, with the goal of making it as easy as possible for C devs to integrate unit testing and test-driven development(TDD) into their workflow.\n\n## *Summary*:\n* [How to Build and Use](#HowToBuild)\n* [General Structure of a Test file](#generalStructure)\n* [Test Groups](#testGroups)\n* [Assertions](#assertions)\n* [Additional Features](#additionalFeatures)\n* [Contributing](#contributing)\n* [Examples](#examples)\n\u003ca id='HowToBuild'\u003e\u003c/a\u003e\n## \u003e *How to Build and Use*:\n - you can either build the library to use everywhere in the future:\n   ```bash\n   $\u003e make lib\n   $\u003e gcc -o Test MyTestFile.c jt.a\n   ```\n- Or you can compile it using the makeFile:\n  ```bash\n    \u003e\u003e change FILE=\u003cpath_to_your_file\u003e\n    $\u003e make\n  ```\n- BONUS:\n     - you can directly override variables in the makeFile like this:\n   ```bash\n   $\u003e make FILE=\u003cpath_to_your_file\u003e\n   ```\n     - Check [LIBASM](https://github.com/Ayg0/LIBASM) where I did add Tests for under the Linux Section.  \n\u003ca id='generalStructure'\u003e\u003c/a\u003e\n## \u003e *Structure of a Test file*:\n  - Your test file must Contain:\n      - main with at leats `JTEST_START` and `JTEST_END`, which defines the block where you call the tests.\n      - You can call induvial TestGroups Using `runTest`(\u003ctestGroup\u003e); or run all tests using `runAll`();\n      - A definition of `Jsetup`() and `Jcleanup`(), you can leave them empty if you don't need them.\n  - your test file can have multiple testGroups declared.\n  - Multiple Assertions to make sure everything works well.  \n\u003ca id='testGroups'\u003e\u003c/a\u003e\n## \u003e *Test Groups*:\n  - If you Assertions are for the same purpose consider Grouping them under a TestGroup.\n  - Here is a declaration example ensuring the output of the add function:\n      ```C\n        TEST_START(AddOutputChecks)\n          ASSERT_INT32_EQU(3, add(1,2));\n          ASSERT_INT32_EQU(-5, add(6, -11));\n        TEST_END\n      ```\n  - TestGroups can be flaged to be ignored and not ran by JTEST, using the optional param `IGNORE_TEST`:\n      ```C\n        TEST_START(AddOutputChecks, IGNORE_TEST)\n          ASSERT_INT32_EQU(3, add(1,2));\n          ASSERT_INT32_EQU(-5, add(6, -11));\n        TEST_END\n      ```  \n\u003ca id='assertions'\u003e\u003c/a\u003e\n## \u003e *Assertions*:\n  - Assertions are your building blocks, they support all generic types for example:\n      ```C\n          ASSERT_UINT32_EQU(3, add(1,2));\n          ASSERT_INT32_EQU(-5, add(6, -11));\n          ASSERT_FLOAT_EQU(3.14, PI);\n      ```\n  - And also supports some useful formats, and types for example:\n     ```C\n          ASSERT_HEX_EQU(0x45, 0x43);\n          ASSERT_STR_EQU(\"Hello\", s);\n      ```\n  - you can also test your own types using `ASSERT_DATA_EQU` for example:\n    ```C\n        /*More Information Available in the TestExamples.c*/\n        typedef struct vector{\n          int x;\n          int y;\n        } _vector;\n\n        _vector v1 = {.x = 0, .y = 6};\n        _vector v2 = {.x = 0, .y = 6};\n        ASSERT_DATA_EQU(\u0026v1, \u0026v2, cmpVector, printVector);\n    ```\n\u003ca id='additionalFeatures'\u003e\u003c/a\u003e\n## \u003e *Additional Features*:\n  **=\u003e** Jtest Work on the Standard Error By default making it easier to dump it's output to a log file.  \n  **=\u003e** Jtest offers a No-Colors mode to make it well presented in a log file where colors will not show up (check Makefile).  \n\u003ca id='contributing'\u003e\u003c/a\u003e\n## \u003e *Contributing*:\n  Contributions are very welcome! Feel free to open issues or pull requests for bug fixes, improvements, or new features.  \n\u003ca id='examples'\u003e\u003c/a\u003e\n## \u003e *Examples*:\n| atoiBase | jtestExample |\n|---|---|\n| \u003cimg src=\"Assets/atoiBaseTests.png\" alt=\"Image 1\" width=\"400\"\u003e | \u003cimg src=\"Assets/jtestTests.png\" alt=\"Image 2\" width=\"400\"\u003e |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0rayn%2Fjt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0rayn%2Fjt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0rayn%2Fjt/lists"}