Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hargoniX/nest-slimcheck
https://github.com/hargoniX/nest-slimcheck
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hargoniX/nest-slimcheck
- Owner: hargoniX
- License: other
- Created: 2023-08-27T21:36:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-17T16:29:56.000Z (over 1 year ago)
- Last Synced: 2024-07-18T15:29:26.492Z (6 months ago)
- Language: Lean
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `nest-slimcheck`
An `IsTest` implementation such that the `SlimCheck` framework can be
used with [`nest-core`](https://github.com/hargonix/nest-core).The main contribution of this implementation is the `PropTest` type,
together with its `IsTest` implementation such that the `SlimCheck`
framework can be called from within `nest` test suites.Here is a full example:
```lean
import NestCore
import NestSlimCheckopen Nest.Core
open Nest.SlimCheckdef tests : TestTree := [nest|
group "examples"
group "examples positive"
test "rfl" : PropTest := .mk <| ∀ (x : Nat), x = x
test "reverse_append" : PropTest := .mk <| ∀ (xs ys : List Nat), (xs ++ ys).reverse = ys.reverse ++ xs.reverse
group "examples negative"
test "lt" : PropTest := .mk <| ∀ (x y : Nat), x < y
test "append_com" : PropTest := .mk <| ∀ (xs ys : List Nat), xs ++ ys = ys ++ xs
]def main : IO UInt32 := Nest.Core.defaultMain tests
```## Dependency footprint
Right now `SlimCheck` is within `mathlib4` which makes it necessary to
pull quite a large chunk of libraries in to compile this adapter, we
hope to extract `SlimCheck` either to `std4` or to its own library
in the future.