{"id":16909630,"url":"https://github.com/yjdoc2/cpp-test-suite","last_synced_at":"2025-03-20T17:47:01.714Z","repository":{"id":100666550,"uuid":"224397678","full_name":"YJDoc2/CPP-Test-Suite","owner":"YJDoc2","description":"A simple testing framework written in C++ for test driven developement","archived":false,"fork":false,"pushed_at":"2019-11-27T10:29:32.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T16:28:57.343Z","etag":null,"topics":["cpp14","test-driven-development"],"latest_commit_sha":null,"homepage":"","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/YJDoc2.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":"2019-11-27T09:49:51.000Z","updated_at":"2020-09-28T08:25:17.000Z","dependencies_parsed_at":"2023-05-16T15:45:28.304Z","dependency_job_id":null,"html_url":"https://github.com/YJDoc2/CPP-Test-Suite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJDoc2%2FCPP-Test-Suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJDoc2%2FCPP-Test-Suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJDoc2%2FCPP-Test-Suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJDoc2%2FCPP-Test-Suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YJDoc2","download_url":"https://codeload.github.com/YJDoc2/CPP-Test-Suite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244666309,"owners_count":20490283,"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":["cpp14","test-driven-development"],"created_at":"2024-10-13T18:56:40.676Z","updated_at":"2025-03-20T17:47:01.709Z","avatar_url":"https://github.com/YJDoc2.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CPP-Test-Suite\n\n## Introduction\n\nRepository of a basic Test Suite made in c++, for easier testing of c++ Programs.  \nThere are two possible mode for testing - class based and function based.  \nCompiling using make will create class_eg and fn_eg, the compiled class_test_example.cpp abd functional_test_example.cpp\n\n## assertion_exception\n\nA basic class extending std::exception class,providing a standerd class to throw.  \nCan be instantiated using a message string, or a message char array,\nor a message string, expected and obtained vaule (both of same type)\n\n## Class Based Testing using test_class_suite.\n\nFirst make a class extending 'test' class. implement run_test() function, before() and after() functions are optional to implement.\nOne can write multiple funtions in the class, each calling before() and after() if required. In case the test fails, the function should Throw an assertion_exception. All functions running the tests should be called in run_test() function.  \nA test_class_suite should be created, and a pointer to all test class variables should be added using add_test().\n\nOne can run tests in two ways :\n\n\u003col\u003e\n\u003cli\u003erun_tests() : aborting the run on first assertion_exception caught,which will be thrown by test_class_suite\u003c/li\u003e\n\u003cli\u003erun_all_test() : running all tests and throwing a std::list of assertion_exception caught,if any.\u003c/li\u003e\n\u003c/ol\u003e\n\n## Function Based Testing using test_functional_suite.\n\nwrite all functions running tests, and throwing an assertion_exception if test fails. Create a test_functional_suite variable. One can set the before() and after() functions using set_before_function() and set_after_function().  \nThe before funtion will be called before \u003cstrong\u003eall\u003c/strong\u003e tests, and the after function will be called after \u003cstrong\u003eall\u003c/strong\u003e the tests.  \nOne can add the functions that run the tests using add_test(fn_name).\n\u003cb\u003e\u003ci\u003eNOTE : \u003c/i\u003e\u003c/b\u003e The tesing funtion should be return void and should not have any parameters.\n\nOne can run tests in two ways :\n\n\u003col\u003e\n\u003cli\u003erun_tests() : aborting the run on first assertion_exception caught,which will be thrown by test_functional_suite\u003c/li\u003e\n\u003cli\u003erun_all_test() : running all tests and throwing a std::list of assertion_exception caught,if any.\u003c/li\u003e\n\u003c/ol\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjdoc2%2Fcpp-test-suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyjdoc2%2Fcpp-test-suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjdoc2%2Fcpp-test-suite/lists"}