Switched tests to use a diff function rather than string comparison.