A simple, expressive testing framework for Shen programs
Shen
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE.txt
README.asciidoc
sample-tests.shen
shen-test.shen

README.asciidoc

ShenTest

ShenTest is a simple, expressive testing framework for Shen programs.

Status: Alpha

It’s still cooking. Here’s a quick taste to whet your appetite:

(load "shen-test.shen")

(testing "(vector N)"
  given
    N is 3
    V is (vector N)
  verify
    V satisfies vector?
    (limit V) is N)

(testing "(<-vector V N)"
  given V is (vector-> (vector 2) 1 a-previously-stored-value)
  verify
    (<-vector V 1) is a-previously-stored-value
    (<-vector V -1) raises an error
    (<-vector V 0) raises "cannot access 0th element of a vector"
    (<-vector V 2) raises "vector element not found"
    (<-vector V 3) raises an error)

A few more examples are in sample-tests.shen.

License

ShenTest is Copyright © 2015 Greg Spurrier. It is distributed under the terms of the MIT License. See LICENSE.txt for the details.