Added tests for the distance field