1
0
Fork 0

added tests for is-in-polygon

This commit is contained in:
scottashton 2014-11-10 11:29:45 +01:00
parent 8281bda4c4
commit 1feb2df0c9
1 changed files with 8 additions and 13 deletions

View File

@ -60,25 +60,20 @@ function isInPolygonSuite () {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
testIsInPolygonSuiteAsResult : function () { 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 () { 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 () { 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 () { testIsInPolygonSuiteWithListParameterWithReverseParameterOrder : function () {
assertFalse(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 11, 0 ] ], [ 0, 11 ], false)").json[0]); assertFalse(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ], [ 0, 10 ], [ 10, 10 ], [ 11, 0 ] ], [ 1, 11 ], false)").json[0]);
}, }
testIsInPolygonSuiteWithSinglePointPolygon : function () {
assertTrue(AQL_EXECUTE("RETURN IS_IN_POLYGON ([[ 0, 0 ]], [ 0, 0 ])").json[0]);
}*/
}; };
} }