Skip to content

Add Miso.Check#1429

Draft
dmjio wants to merge 2 commits intomasterfrom
check
Draft

Add Miso.Check#1429
dmjio wants to merge 2 commits intomasterfrom
check

Conversation

@dmjio
Copy link
Copy Markdown
Owner

@dmjio dmjio commented Feb 20, 2026

This adds a simple QuickCheck-like module meant for use with miso-tests.

This also refactors splitmix to use 64-bit Word and an implementation inspired by Java SplittableGen / rust rand_xoshiro.

Also refactors to use Math.random() since its more portable / performant and Miso.Random is not meant to be used in cryptographically secure contexts (unline crypto.getRandomValues()), best for games, simulations and randomized testing.

  • Adds ToJSVal / FromJSVal for Word64.
  • Drops splitmix32 in favor of a Haskell impl. based on splitmix64.
  • Regen JS
  • Add Miso.Check w/ Arbitrary class, basic instances.

This adds simple `QuickCheck`-like module meant for use with
`miso-tests`.

This also refactors `splitmix` to use 64-bit Word and an
implementation inspired by Java `SplittableGen` / rust `rand_xoshiro`.

Also refactors to use `Math.random()` since its more portable and
`Miso.Random` is not meant to be used in cryptographically secure
contexts (unline `crypto.getRandomValues()`).

- [x] Adds `ToJSVal` / `FromJSVal` for `Word64`.
- [x] Drops `splitmix32` in favor of a Haskell impl. based on `splitmix64`.
- [x] Regen JS
- [x] Add `Miso.Check` w/ `Arbitrary` class, basic instances.
- [ ] Add additional `Arbitrary` instances.
- [ ] Add `property` function to `Test` API in `miso-tests`
- [ ] Refactor most tests to use property-based testing.
@dmjio dmjio marked this pull request as draft February 20, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant