# New library: Compile time unit tests!

**URL:** <https://racket.discourse.group/t/new-library-compile-time-unit-tests/3919>\
**Category:** Show & Tell\
**Created:** [August 25, 2025, 6:05am UTC](https://racket.discourse.group/t/new-library-compile-time-unit-tests/3919 "2025-08-25T06:05:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcn](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pcn](https://racket.discourse.group/u/pcn)\
**Post date:** [August 25, 2025, 6:05am UTC](https://racket.discourse.group/t/new-library-compile-time-unit-tests/3919/1 "2025-08-25T06:05:04Z")

</div>

Do you prefer a quicker test-driven development turnaround, and have battery and CPU cycles to spare? Check out this [library](https://github.com/philnguyen/examples) that lets you have compile-time unit tests, whose failures are highlighted as syntax errors in your favorite editor!

```console
raco pkg install examples

```

The library is inspired by Lean's [`#guard`](https://github.com/leanprover/lean4/blob/8e828216e53de9a676ba6bd3486a96e1eb87de9e/src/Init/Guard.lean) commands, but they're not equivalent. For example, Lean can make statements involving free variables. But Racket can run arbitrary code!

At the moment, the library has most of RackUnit's [basic checks](https://docs.racket-lang.org/rackunit/api.html#%28part._rackunit~3abasic-checks%29). Pull requests are welcome (especially help with scribblings if there are problems; I'm technology-illerate and this is my first time trying to use scribble to document 🙃)
