Shorter tests with Rust macros

One of the features I've used the least in Rust are macros. Some time ago I found a post on Rust Forum that recommended using macros to replace 'table driven tests'

In Go there is a pattern called Table Driven Tests, where you store the input and expected outputs of a test case in a sequence of structures. Then iterate over them and run a test on each one.

In Rust we can achieve the same improvement with macros to remove the boilerplate involving defining a test case. Although we don't use iteration or store the input and expected output of a case in a Rust value we achieve the same goal of succinct test definitions.

I used the pattern on a percent-encoding implementation for the now superseded Bliki project.