Make precision in test configurable.

This commit is contained in:
Marc Jansen
2012-02-15 10:02:33 +01:00
parent 5faea8e083
commit c776dac2c2

View File

@@ -283,8 +283,9 @@
expectGeom = points["dest"].geometry,
// we don't use geometry::toString because we might run into
// precision issues
got = gotGeom.x.toFixed(7) + ' ' + gotGeom.y.toFixed(7),
expected = expectGeom.x.toFixed(7) + ' ' + expectGeom.y.toFixed(7);
precision = 7,
got = gotGeom.x.toFixed(precision) + ' ' + gotGeom.y.toFixed(precision),
expected = expectGeom.x.toFixed(precision) + ' ' + expectGeom.y.toFixed(precision);
t.eq(got, expected,
"Geometry collections aren't transformed twice when reprojection.");