mirror of https://gitee.com/bigwinds/arangodb
added tests for is-in-polygon
This commit is contained in:
parent
8281bda4c4
commit
1feb2df0c9
|
@ -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]);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue