Simplify merkle tests
The following patterns are repeated a lot:
- "I called a function with some input; did I get the error I expected? If no, t.Errorf and continue"
- "I called a function with some input; did I get the value I expected? If no, t.Errorf and continue"
We can package the above in internal
as common test functions, then start using it for all packages (starting with merkle).
Related to !5 (merged) which already uses the above.