Add test helper functions; move nearlyEqual to helper file