{"id":18272383,"url":"https://github.com/simogasp/boosttest-example","last_synced_at":"2026-01-21T07:33:04.477Z","repository":{"id":74911681,"uuid":"98651294","full_name":"simogasp/boostTest-example","owner":"simogasp","description":"template for using boost as testing framework","archived":false,"fork":false,"pushed_at":"2018-02-11T21:40:29.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T03:19:29.454Z","etag":null,"topics":["boost-library","boost-test","cmake","cmake-examples","cmake-test","ctest","example","tutorial"],"latest_commit_sha":null,"homepage":null,"language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simogasp.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":"2017-07-28T13:18:22.000Z","updated_at":"2024-02-05T22:13:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"bca200e2-8498-49ea-ad5a-d0986e85e6dc","html_url":"https://github.com/simogasp/boostTest-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simogasp/boostTest-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simogasp%2FboostTest-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simogasp%2FboostTest-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simogasp%2FboostTest-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simogasp%2FboostTest-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simogasp","download_url":"https://codeload.github.com/simogasp/boostTest-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simogasp%2FboostTest-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["boost-library","boost-test","cmake","cmake-examples","cmake-test","ctest","example","tutorial"],"created_at":"2024-11-05T11:42:05.454Z","updated_at":"2026-01-21T07:33:04.455Z","avatar_url":"https://github.com/simogasp.png","language":"CMake","readme":"Boost Test Example\n------------------\n\nA sample to show how to use Boost Test Framework in a cmake project.\nThe major steps to follow are:\n\n1. enable CTest inside cmake with `enable_testing()`\n\n2. in order to use Boost.Test the relevant component must be in \n```cmake\nfind_package(Boost COMPONENTS unit_test_framework REQUIRED)\n```\n\n3. check the usage of the helper cmake function `add_boost_test()` in [BoostTestHelper.cmake](cmake/BoostTestHelper.cmake).\nIt allows to add any single test source as a test to be run with `make test`.\n\n4. The function takes the source file and uses its name for the executable. A prefix can be passed to the function in order to, e.g., group together tests belonging to the same module (see below, `greetings_testHello` and `greetings_testGoodbye`).\n\n5. The function also parses each test source and isolates each `BOOST_AUTO_TEST_SUITE`s, so that each suite is run and \nvisualised as a separated test (e.g. see `greetings_testGoodbye.test_goodbye` and `greetings_testGoodbye.test_goodbyeWorld`). \nThis means that no `BOOST_AUTO_TEST_CASE` shall be left outside a suite or it will not be run during make test.\n\n```bash\nRunning tests...\nTest project /Users/sgaspari/dev/code/popart/libs/sandbox/ctest_example/cmake-build-debug\n    Start 1: greetings_testHello.test_hello\n1/6 Test #1: greetings_testHello.test_hello ......................   Passed    0.01 sec\n    Start 2: greetings_testHello.test_helloWorld\n2/6 Test #2: greetings_testHello.test_helloWorld .................   Passed    0.00 sec\n    Start 3: greetings_testGoodbye.test_goodbye\n3/6 Test #3: greetings_testGoodbye.test_goodbye ..................   Passed    0.00 sec\n    Start 4: greetings_testGoodbye.test_goodbyeWorld\n4/6 Test #4: greetings_testGoodbye.test_goodbyeWorld .............   Passed    0.00 sec\n    Start 5: computing_testMultiplication.test_multiply\n5/6 Test #5: computing_testMultiplication.test_multiply ..........   Passed    0.01 sec\n    Start 6: computing_testMultiplication.test_computeInterest\n6/6 Test #6: computing_testMultiplication.test_computeInterest ...   Passed    0.00 sec\n\n100% tests passed, 0 tests failed out of 6\n\nTotal Test time (real) =   0.03 sec\n\n```\n\n\n### Build\n\nThe project depends on Boost Test Framework (`libboost-test-dev`).\nIn order to build the project simply\n\n```bash\nmkdir build\ncd build\ncmake ..\nmake -j2\n\n```\nThen you can run the tests\n```bash\nmake test\n```\n\nLinux build CI (Travis): \n[![Build Status](https://travis-ci.org/simogasp/boostTest-example.svg?branch=master)](https://travis-ci.org/simogasp/boostTest-example)\n\nWindows build CI (Windows):\n[![Build status](https://ci.appveyor.com/api/projects/status/78u6sldo0bmk48lm?svg=true)](https://ci.appveyor.com/project/simogasp/boosttest-example)\n\n### License\n\nMozilla Public License v2.0 (see [LICENSE](LICENSE))\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimogasp%2Fboosttest-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimogasp%2Fboosttest-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimogasp%2Fboosttest-example/lists"}