{"id":26025283,"url":"https://github.com/swensensoftware/unquote","last_synced_at":"2025-05-14T18:05:09.425Z","repository":{"id":44650168,"uuid":"37795640","full_name":"SwensenSoftware/unquote","owner":"SwensenSoftware","description":"Write F# unit test assertions as quoted expressions, get step-by-step failure messages for free","archived":false,"fork":false,"pushed_at":"2024-12-01T02:53:35.000Z","size":2542,"stargazers_count":291,"open_issues_count":8,"forks_count":24,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-14T18:04:59.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.swensensoftware.com/unquote","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SwensenSoftware.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,"zenodo":null}},"created_at":"2015-06-21T03:53:39.000Z","updated_at":"2025-05-10T08:06:00.000Z","dependencies_parsed_at":"2024-01-06T23:55:31.995Z","dependency_job_id":"11f3c73d-e41c-4084-a1b5-2d734417cb7a","html_url":"https://github.com/SwensenSoftware/unquote","commit_stats":{"total_commits":476,"total_committers":13,"mean_commits":36.61538461538461,"dds":"0.11554621848739499","last_synced_commit":"65a387801325d70ec03c16e6da8b58a468cbd2f3"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwensenSoftware%2Funquote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwensenSoftware%2Funquote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwensenSoftware%2Funquote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwensenSoftware%2Funquote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwensenSoftware","download_url":"https://codeload.github.com/SwensenSoftware/unquote/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198514,"owners_count":22030965,"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":"2025-03-06T13:24:08.062Z","updated_at":"2025-05-14T18:05:04.416Z","avatar_url":"https://github.com/SwensenSoftware.png","language":"F#","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=ZNFZMKQF77YRC"],"categories":["Testing"],"sub_categories":["Performance Analysis"],"readme":"[User Guide](../../wiki/UserGuide) | [NuGet](https://www.nuget.org/packages/Unquote/) | [Release Notes](../../wiki/ReleaseNotes) | [Issues](../../issues) | [Contributing](../../wiki/Contributing)\n\n---\n\nUnquote is not just another DSL or API for making unit test assertions. Instead, assertions are written as plain, statically-checked F# [quoted expressions](http://msdn.microsoft.com/en-us/library/dd233212.aspx) and test failure messages are given as step-by-step F# expression evaluations.\n\nUnquote integrates configuration-free with all exception-based unit testing frameworks including xUnit.net, NUnit, MbUnit, Fuchu, and MSTest. For example, the following failing xUnit.net test\n\n```\n[\u003cFact\u003e]\nlet ``demo Unquote xUnit support`` () =\n    test \u003c@ [3; 2; 1; 0] |\u003e List.map ((+) 1) = [1 + 3..1 + 0] @\u003e\n```\n\nproduces the following failure message\n\n```\nTest 'Module.demo Unquote xUnit support' failed: \n\n[3; 2; 1; 0] |\u003e List.map ((+) 1) = [1 + 3..1 + 0]\n[4; 3; 2; 1] = [4..1]\n[4; 3; 2; 1] = []\nfalse\n\n\tC:\\File.fs(28,0): at Module.demo Unquote xUnit support()\n```\n\nUnquote may even be used within FSI sessions, enabling the direct migration of ad-hoc FSI tests during interactive development to formal test suites.\n\nIn addition to `test : Quotations.Expr\u003cbool\u003e -\u003e unit` used for performing most assertions, Unquote has convenience operators `=!`, `\u003e!`, `\u003c!`, `\u003e=!`, `\u003c=!`, and `\u003c\u003e!` for performing  simple comparison assertions. And finally, Unquote has operators `raises\u003c'a when 'a :\u003e exn\u003e : Quotations.Expr -\u003e unit` and `raisesWith : Expr -\u003e (#exn -\u003e Expr\u003cbool\u003e) -\u003e unit` for asserting whether a quoted expression raises an expected exception.\n\nAt the heart of Unquote, are (public) operators for decompiling, evaluating, and incrementally reducing F# Quotations. Unquote can decompile many F# quoted expressions as single line, non-light syntax strings. See [Decompiler Features](../../wiki/DecompilerFeatures) for a list of notable decompiler features.\n\nThe incremental evaluator performs reduction steps until a non-reducible expression is reached. During a reduction step, an expression will be reduced if all of its subexpressions are already reduced, recursively reducing the sub-expressions otherwise. Hence order of evaluation is not strictly adhered to, but shouldn't be a problem in practice since assertion expressions are not expected to depend on order of evaluation side effects. Except for sequential expressions, which are evaluated from left to right, and control structures and boolean operator expressions, which follow valid branch paths and short-circuiting rules. If a test expression throws an exception, the test will fail and print each reduction step up to the point of the exception, and then print the exception.\n\n---\n\nTo learn more about how to use Unquote, see [User Guide](../../wiki/UserGuide)\n\nTo learn about how you can contribute to Unquote's development, see [Contributing](../../wiki/Contributing)\n\n---\n\nUnquote was originally inspired by [Groovy Power Asserts](http://dontmindthelanguage.wordpress.com/2009/12/11/groovy-1-7-power-assert/).\n\n---\n\nYou are welcome to [Pay What You Want](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=ZNFZMKQF77YRC) for Unquote via PayPal.\n\nCopyright 2011-2024 [Swensen Software](http://www.swensensoftware.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswensensoftware%2Funquote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswensensoftware%2Funquote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswensensoftware%2Funquote/lists"}