[an error occurred while processing this directive]
RPN Unit Test (rut) started as a little hack to test some number-theoretic code I was working on. I needed an easy test framework for some vanilla C functions, and so a stack-based language seemed the easiest choice. I wanted the ability to quickly define regression tests for a function, so I added some syntactic sugar for that. I needed memory leak checking, so I wrote it. Eventually, I integrated my multiprecise integer code as a base type, and started using the framework to test other code I was working on.
For example, a regression test might look like this:
[5 1 3 modexp] 1 5
This example invokes the function modexp(5, 1, 3), expecting the return values (1, 5) in return. All the magic of converting the parameters to bignums, and parsing the return values is handled via generic wrapper functions.
Currently, rut features:
These are a little further away than the to-do.
You can download the latest version here:
I hate autoconf, but until I replace it:
$ ./autogunk && ./configure && make
The build is targeted for OpenBSD. Compatability goo (things that you don't have, but OpenBSD does) is in openbsd-compat.
Good Luck
Have a look in docs/. Some of it is even up to date.