{"id":20606126,"url":"https://github.com/rudymatela/test-framework-leancheck","last_synced_at":"2025-04-15T02:40:38.516Z","repository":{"id":56880143,"uuid":"147946315","full_name":"rudymatela/test-framework-leancheck","owner":"rudymatela","description":"LeanCheck support for test-framework.","archived":false,"fork":false,"pushed_at":"2025-01-30T17:11:47.000Z","size":59,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T14:22:34.917Z","etag":null,"topics":["haskell","leancheck","test-framework","testing","testing-framework","testing-tools"],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rudymatela.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}},"created_at":"2018-09-08T15:36:49.000Z","updated_at":"2025-01-30T17:11:51.000Z","dependencies_parsed_at":"2024-02-09T12:12:14.108Z","dependency_job_id":null,"html_url":"https://github.com/rudymatela/test-framework-leancheck","commit_stats":{"total_commits":42,"total_committers":1,"mean_commits":42.0,"dds":0.0,"last_synced_commit":"22a68c8798f335e82c057cba208a8900aaa4e100"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudymatela%2Ftest-framework-leancheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudymatela%2Ftest-framework-leancheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudymatela%2Ftest-framework-leancheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudymatela%2Ftest-framework-leancheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rudymatela","download_url":"https://codeload.github.com/rudymatela/test-framework-leancheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732399,"owners_count":21152849,"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":["haskell","leancheck","test-framework","testing","testing-framework","testing-tools"],"created_at":"2024-11-16T09:32:38.414Z","updated_at":"2025-04-15T02:40:38.497Z","avatar_url":"https://github.com/rudymatela.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"test-framework-leancheck: LeanCheck support for test-framework\n==============================================================\n\n[![test-framework-leancheck's Build Status][build-status]][build-log]\n[![test-framework-leancheck on Hackage][hackage-version]][test-framework-leancheck-on-hackage]\n[![test-framework-leancheck on Stackage LTS][stackage-lts-badge]][test-framework-leancheck-on-stackage-lts]\n[![test-framework-leancheck on Stackage Nightly][stackage-nightly-badge]][test-framework-leancheck-on-stackage-nightly]\n\n[LeanCheck] support for the [test-framework] test framework.\n\n\nInstalling\n----------\n\n    $ cabal install test-framework-leancheck\n\n\nExample\n-------\n\nHere's how your `test.hs` might look like:\n\n```haskell\nimport Test.Framework\nimport Test.Framework.Providers.LeanCheck as LC\nimport Data.List\n\nmain :: IO ()\nmain = defaultMain tests\n\ntests :: [Test]\ntests =\n  [ LC.testProperty \"sort . sort == sort\"\n      $ \\xs -\u003e sort (sort xs :: [Int]) == sort xs\n  , LC.testProperty \"sort == id\" -- not really, should fail\n      $ \\xs -\u003e sort (xs :: [Int]) == xs\n  ]\n```\n\nAnd here is the output for the above program:\n\n```\n$ ./eg/test\nsort . sort == sort: [OK, passed 100 tests.]\nsort == id: [Failed]\n*** Failed! Falsifiable (after 7 tests):\n[1,0]\n\n         Properties  Total\n Passed  1           1\n Failed  1           1\n Total   2           2\n```\n\n\nOptions\n-------\n\nUse `-a` or `--maximum-generated-tests` to configure\nthe maximum number of tests for each property.\n\n```\n$ ./eg/test -a5\nsort . sort == sort: [OK, passed 5 tests.]\nsort == id: [OK, passed 5 tests.]\n\n         Properties  Total      \n Passed  2           2          \n Failed  0           0          \n Total   2           2          \n```\n\nSince LeanCheck is enumerative,\nyou may want to increase the default number of tests (100).\nArbitrary rule of thumb:\n\n* between 200 to 500 on a developer machine;\n* between 1000 and 5000 on the CI.\n\nYour mileage may vary.\n\n\nFurther reading\n---------------\n\n* [test-framework-leancheck's Haddock documentation];\n* [LeanCheck's Haddock documentation];\n* [test-framework's Haddock documentation];\n* [LeanCheck's README];\n* [test-framework's official example];\n* [Tutorial on property-based testing with LeanCheck].\n\n[test-framework-leancheck's Haddock documentation]: https://hackage.haskell.org/package/test-framework-leancheck/docs/Test-Framework-Providers-LeanCheck.html\n[LeanCheck's Haddock documentation]:      https://hackage.haskell.org/package/leancheck/docs/Test-LeanCheck.html\n[test-framework's Haddock documentation]: https://hackage.haskell.org/package/test-framework/docs/Test-Framework.html\n[LeanCheck's README]:                     https://github.com/rudymatela/leancheck#readme\n[test-framework's official example]: https://raw.githubusercontent.com/haskell/test-framework/master/example/Test/Framework/Example.lhs\n[tutorial on property-based testing with LeanCheck]: https://github.com/rudymatela/leancheck/blob/master/doc/tutorial.md\n\n[test-framework]: https://github.com/haskell/test-framework\n[LeanCheck]:      https://github.com/rudymatela/leancheck\n\n[build-log]:     https://github.com/rudymatela/test-framework-leancheck/actions/workflows/build.yml\n[build-status]:  https://github.com/rudymatela/test-framework-leancheck/actions/workflows/build.yml/badge.svg\n[hackage-version]:                              https://img.shields.io/hackage/v/test-framework-leancheck.svg\n[test-framework-leancheck-on-hackage]:          https://hackage.haskell.org/package/test-framework-leancheck\n[stackage-lts-badge]:                           https://stackage.org/package/test-framework-leancheck/badge/lts\n[stackage-nightly-badge]:                       https://stackage.org/package/test-framework-leancheck/badge/nightly\n[test-framework-leancheck-on-stackage]:         https://stackage.org/package/test-framework-leancheck\n[test-framework-leancheck-on-stackage-lts]:     https://stackage.org/lts/package/test-framework-leancheck\n[test-framework-leancheck-on-stackage-nightly]: https://stackage.org/nightly/package/test-framework-leancheck\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frudymatela%2Ftest-framework-leancheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frudymatela%2Ftest-framework-leancheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frudymatela%2Ftest-framework-leancheck/lists"}