Table Test
This library aims to make table testing reliable in Rust.
The main problem of table testing with basic Rust is assert_eq! calling panic!.
It means that when an assertion fails, then the rest of the test function is not executed.
In the case of a table test, it will result with potentially multiple use cases untested, making the output of that test unreliable.
Usage
Specify this crate as [dev-dependencies].
[]
= "0.1.1"
// <-- not needed in integration tests
extern crate table_test;
The table iterator returns a tuple (validator, input, expected).
If you have more than one input, just use a tuple of inputs.
Examples
If we make a simple test for an add function that takes two values as input:
If we make a mistake in the implementation of the add function and multiplying instead, then the output will look like this:

As we can see, it would be easier to debug than with a normal assert_eq! output.
But the gain is when we work with something more complex.
The example here test the changing name method and the result looks like this:
