dedbox: Posts tagged 'Racket'urn:https-dedbox-github-io:-tags-Racket-html2020-03-17T11:00:00ZTemplate Macros, Initial Releaseurn:https-dedbox-github-io:-2020-03-template-macros-initial-release-html2020-03-17T11:00:00Z2020-03-17T11:00:00ZEric Griffis
<p><a href="https://github.com/dedbox/racket-template">Template Macros</a> are a new <a href="https://racket-lang.org/">Racket</a> library that dramatically simplifies the
generation of meta-program code.</p><a href="https://dedbox.github.io/2020/03/template-macros-initial-release.html?utm_source=Racket&utm_medium=Atom"><em>More…</em></a>Customizing Source Locations in Rackunit Macrosurn:https-dedbox-github-io:-2019-09-customizing-source-locations-in-rackunit-macros-html2019-09-09T16:54:15Z2019-09-09T16:54:15ZEric Griffis
<p>Generating <a class="Sq" data-pltdoc="x" href="https://docs.racket-lang.org/local-redirect/?tag=%28part._%28.%27%28lib._rackunit%2Fscribblings%2Frackunit..scrbl%29.%27._.%27top.%27%29%29">rackunit</a> tests with <a href="https://racket-lang.org/">Racket</a> macros is an easy way to improve the
quality of your unit tests and your unit testing experience. Macros not only
save you the time and energy of writing boilerplate, but also allow you to
customize how tests are specified.</p>
<p>So what’s the catch?</p>
<p><a class="Sq" data-pltdoc="x" href="https://docs.racket-lang.org/local-redirect/?tag=%28part._%28.%27%28lib._rackunit%2Fscribblings%2Frackunit..scrbl%29.%27._.%27top.%27%29%29">rackunit</a>’s basic checks are, by and large, functions. They raise run-time
errors when they fail, and run-time errors report the source locations of
their call sites. In tests generated by purely pattern-based macros, these
locations point inside the macro definitions. Giving useful source locations
to macro-generated tests takes a little more work.</p><a href="https://dedbox.github.io/2019/09/customizing-source-locations-in-rackunit-macros.html?utm_source=Racket&utm_medium=Atom"><em>More…</em></a>