From 1feb2df0c947427739c47f0d9af926ffc386eb56 Mon Sep 17 00:00:00 2001 From: scottashton Date: Mon, 10 Nov 2014 11:29:45 +0100 Subject: [PATCH] added tests for is-in-polygon --- js/server/tests/aql-is-in-polygon.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/js/server/tests/aql-is-in-polygon.js b/js/server/tests/aql-is-in-polygon.js index 729527d47b..8b2a1c1279 100644 --- a/js/server/tests/aql-is-in-polygon.js +++ b/js/server/tests/aql-is-in-polygon.js @@ -60,26 +60,21 @@ function isInPolygonSuite () { //////////////////////////////////////////////////////////////////////////////// testIsInPolygonSuiteAsResult : function () { - assertTrue(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 10, 0 ] ], 10, 9)").json[0]); - } - /* + assertTrue(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 10, 0 ] ], 9, 9)").json[0]); + }, + testIsNotInPolygonSuiteAsResult : function () { - assertFalse(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 10, 0 ] ], 10, 11)").json[0]); + assertFalse(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 10, 0 ] ], 11, 11)").json[0]); }, testIsInPolygonSuiteWithListParameter : function () { - assertTrue(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 11, 0 ] ], [ 11, 0 ])").json[0]); + assertTrue(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 11, 0 ] ], [ 10, 1 ])").json[0]); }, testIsInPolygonSuiteWithListParameterWithReverseParameterOrder : function () { - assertFalse(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 11, 0 ] ], [ 0, 11 ], false)").json[0]); - }, - - testIsInPolygonSuiteWithSinglePointPolygon : function () { - assertTrue(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ]], [ 0, 0 ])").json[0]); - }*/ - - + assertFalse(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 11, 0 ] ], [ 1, 11 ], false)").json[0]); + } + }; }