Add set testing

This PR adds set testing.

Targets #181
Either declare `i` inside the `for` or make it a `while`.