{"id":23160685,"url":"https://github.com/ectalite/pico-unit","last_synced_at":"2025-04-04T19:23:03.032Z","repository":{"id":236012957,"uuid":"791725867","full_name":"Ectalite/Pico-Unit","owner":"Ectalite","description":"Simple and lightweight Test-Framework for Raspberry Pi Pico","archived":false,"fork":false,"pushed_at":"2024-07-11T12:10:36.000Z","size":676,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T04:28:53.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ectalite.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-04-25T08:51:24.000Z","updated_at":"2024-07-11T12:10:39.000Z","dependencies_parsed_at":"2024-06-06T10:58:52.339Z","dependency_job_id":"22e2e10a-de66-4ee9-ba8a-37cc106579a0","html_url":"https://github.com/Ectalite/Pico-Unit","commit_stats":null,"previous_names":["ectalite/pico-unit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ectalite%2FPico-Unit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ectalite%2FPico-Unit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ectalite%2FPico-Unit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ectalite%2FPico-Unit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ectalite","download_url":"https://codeload.github.com/Ectalite/Pico-Unit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247235776,"owners_count":20906020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-17T23:11:51.229Z","updated_at":"2025-04-04T19:23:03.004Z","avatar_url":"https://github.com/Ectalite.png","language":"C","readme":"# Pico-Unit\n\nSimple and lightweight Test-Framework for Raspberry Pi Pico\n\n![Example](./images/picoUnit.png)\n\n## Install\n\nPico Unit can be cloned from GitHub through this link:\n\n![Static Badge](https://img.shields.io/badge/Clone-me-brightgreen?link=https%3A%2F%2Fgithub.com%2FEctalite%2FPico-Unit)\n\nThe `pico-unit.h` header-file must then be included.\n\n## Usage\n\nThe usage of Pico Unit is straightforward :\n\n### 1. Create Tests\n\nUse the `TEST_FUNCTION(\u003ctest name\u003e(\u003cparameters\u003e))` Macro to create a test and use the `ASSERT(\u003ccondition\u003e, \u003cerror to print\u003e)` C-Macro to verify a test condition.\n\n\u003e [!NOTE]\n\u003e This example compares 42 with the amount given in parameter.\n\n``` {.c .copy}\nTEST_FUNCTION(test1(size_t amount),\n    //Calculate something\n    ASSERT(amount == 42, \"Amount is not 42\");\n)\n```\n\n### 2. Create a test family\n\nUse `DEFINE_FAMILY(\u003cfamily name\u003e(\u003cparameters\u003e))` to create a test family with multiple tests that will be called.\n\n\u003e [!NOTE]\n\u003e This examples calls the test `test1` declared in previous example and gives the variable 'amount' as parameter.\n\n``` {.c .copy}\nDEFINE_FAMILY(meineTestFamilie(size_t amount),\n    TEST(test1, amount);\n)\n```\n\n### 3. Start testing a test family\n\nUse `TEST_FAMILY(\u003cfamily to call\u003e(\u003cparameter values\u003e))` to call a test family.\n\n\u003e [!NOTE]\n\u003e This example calls the test-family `meineTestFamilie` and gives 100 as parameter\n\n``` {.c .copy}\nint main() {\n    START_TEST;\n    TEST_FAMILY(meineTestFamilie(100));\n    STOP_TEST;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fectalite%2Fpico-unit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fectalite%2Fpico-unit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fectalite%2Fpico-unit/lists"}