Added some more tests.
Re-jigged testthat framework as advised by Hadley (testthat commit: d66c18e95b96abf4d6bf66832c9e72c239740955).