{"id":17954154,"url":"https://github.com/pmalek/quick","last_synced_at":"2025-04-03T16:33:34.890Z","repository":{"id":75781065,"uuid":"64964926","full_name":"pmalek/quick","owner":"pmalek","description":"quick aims to be a small header only library to help black box testing in C++","archived":false,"fork":false,"pushed_at":"2021-01-24T10:48:14.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T05:21:01.765Z","etag":null,"topics":["blackbox-testing","cpp","cpp14","testing"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmalek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["pmalek"]}},"created_at":"2016-08-04T20:27:00.000Z","updated_at":"2024-04-22T12:08:41.000Z","dependencies_parsed_at":"2023-03-11T20:24:01.787Z","dependency_job_id":null,"html_url":"https://github.com/pmalek/quick","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/pmalek%2Fquick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmalek%2Fquick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmalek%2Fquick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmalek%2Fquick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmalek","download_url":"https://codeload.github.com/pmalek/quick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247037335,"owners_count":20873136,"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":["blackbox-testing","cpp","cpp14","testing"],"created_at":"2024-10-29T10:11:01.537Z","updated_at":"2025-04-03T16:33:34.866Z","avatar_url":"https://github.com/pmalek.png","language":"C++","readme":"# quick\n\n![C++](https://img.shields.io/badge/language-C%2B%2B-blue.svg) ![License](https://img.shields.io/badge/license-GPLv3-blue.svg)\n\n`quick` aims to be a small header only library to help black box testing in C++. \nIt borrows the idea from Golang's [testing/quick package](https://golang.org/pkg/testing/quick/)\n\n### Idea\n\nCreate a predicate where you want to test your struct/class/function/member function and return true on success.\n`quick` will randomly generate input data to this predicate and launch it predefined number of iterations or will keep running for predefined time duration.\n\n### Note\n`quick` is in very alpha state not even remotely close to being ready for production \n\n### Example usage:\n\n```cpp\n#include \u003ciostream\u003e\n#include \u003cstring\u003e\n\n#include \"quick.hpp\"\n\nusing namespace std::chrono_literals;\n\nstd::string prefix(const std::string\u0026 s, int n)\n{\n  static int counter = 0;\n  ++counter;\n  return s.substr(0, n);\n}\n\nint main()\n{\n    auto f1 = [](const std::string\u0026 s, int n){\n      const std::string ret = prefix(s, n);\n      return ret == s.substr(0, n);\n    };\n    quick::check(f1, 200ms, \"Prefix always has N length - 200ms\");\n\n    auto f2 = [](const std::string\u0026 s, int n){\n      const std::string ret = prefix(s, n);\n      return ret == s.substr(0, n);\n    };\n    quick::check(f2, 100, \"Prefix always has N length - 100 iterations\");\n}\n```\n","funding_links":["https://github.com/sponsors/pmalek"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmalek%2Fquick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmalek%2Fquick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmalek%2Fquick/lists"}