diff --git a/tests/data/json/clause6_01.json b/tests/data/json/clause6_01.json new file mode 100644 index 0000000..13ffc3d --- /dev/null +++ b/tests/data/json/clause6_01.json @@ -0,0 +1 @@ +{ "function": { "name": "avg", "args": [ { "property": "windSpeed" } ] } } diff --git a/tests/data/json/clause6_02a.json b/tests/data/json/clause6_02a.json new file mode 100644 index 0000000..f72df61 --- /dev/null +++ b/tests/data/json/clause6_02a.json @@ -0,0 +1,7 @@ +{ + "op": "=", + "args": [ + { "property": "city" }, + "Toronto" + ] +} diff --git a/tests/data/json/clause6_02b.json b/tests/data/json/clause6_02b.json new file mode 100644 index 0000000..81c1378 --- /dev/null +++ b/tests/data/json/clause6_02b.json @@ -0,0 +1,12 @@ +{ + "op": "<", + "args": [ + { + "function": { + "name": "avg", + "args": [ { "property": "windSpeed" } ] + } + }, + 4 + ] +} diff --git a/tests/data/json/clause6_02c.json b/tests/data/json/clause6_02c.json new file mode 100644 index 0000000..8665ea8 --- /dev/null +++ b/tests/data/json/clause6_02c.json @@ -0,0 +1,13 @@ +{ + "op": ">", + "args": [ + { + "op": "-", + "args": [ + { "property": "balance" }, + 150.0 + ] + }, + 0 + ] +} diff --git a/tests/data/json/clause6_02d.json b/tests/data/json/clause6_02d.json new file mode 100644 index 0000000..965a47a --- /dev/null +++ b/tests/data/json/clause6_02d.json @@ -0,0 +1,7 @@ +{ + "op": ">=", + "args": [ + { "property": "updated" }, + { "date": "1970-01-01" } + ] +} diff --git a/tests/data/json/clause6_03.json b/tests/data/json/clause6_03.json new file mode 100644 index 0000000..1196a55 --- /dev/null +++ b/tests/data/json/clause6_03.json @@ -0,0 +1,9 @@ +{ + "op": "not", + "args": [ + { + "op": "isNull", + "args": [ { "property": "geometry" } ] + } + ] +} diff --git a/tests/data/json/clause7_01.json b/tests/data/json/clause7_01.json new file mode 100644 index 0000000..7c3fba5 --- /dev/null +++ b/tests/data/json/clause7_01.json @@ -0,0 +1,7 @@ +{ + "op": "like", + "args": [ + { "property": "name" }, + "Smith%" + ] +} diff --git a/tests/data/json/clause7_02.json b/tests/data/json/clause7_02.json new file mode 100644 index 0000000..07666b4 --- /dev/null +++ b/tests/data/json/clause7_02.json @@ -0,0 +1,8 @@ +{ + "op": "between", + "args": [ + { "property": "depth" }, + 100.0, + 150.0 + ] +} diff --git a/tests/data/json/clause7_03a.json b/tests/data/json/clause7_03a.json new file mode 100644 index 0000000..78d2a35 --- /dev/null +++ b/tests/data/json/clause7_03a.json @@ -0,0 +1,7 @@ +{ + "op": "in", + "args": [ + { "property": "cityName" }, + [ "Toronto", "Frankfurt", "Tokyo", "New York" ] + ] +} diff --git a/tests/data/json/clause7_03b.json b/tests/data/json/clause7_03b.json new file mode 100644 index 0000000..1ac740a --- /dev/null +++ b/tests/data/json/clause7_03b.json @@ -0,0 +1,12 @@ +{ + "op": "not", + "args": [ + { + "op": "in", + "args": [ + { "property": "category" }, + [ 1, 2, 3, 4 ] + ] + } + ] +} diff --git a/tests/data/json/clause7_04.json b/tests/data/json/clause7_04.json new file mode 100644 index 0000000..0d0370d --- /dev/null +++ b/tests/data/json/clause7_04.json @@ -0,0 +1,13 @@ +{ + "op": "in", + "args": [ + { + "op": "casei", + "args": [ { "property": "road_class" } ] + }, + [ + { "op": "casei", "args": [ "Οδος" ] }, + { "op": "casei", "args": [ "Straße" ] } + ] + ] +} diff --git a/tests/data/json/clause7_05.json b/tests/data/json/clause7_05.json new file mode 100644 index 0000000..6071fb4 --- /dev/null +++ b/tests/data/json/clause7_05.json @@ -0,0 +1,13 @@ +{ + "op": "=", + "args": [ + { + "op": "accenti", + "args": [ { "property": "etat_vol" } ] + }, + { + "op": "accenti", + "args": [ "débárquér" ] + } + ] +} diff --git a/tests/data/json/clause7_07.json b/tests/data/json/clause7_07.json new file mode 100644 index 0000000..dd865c3 --- /dev/null +++ b/tests/data/json/clause7_07.json @@ -0,0 +1,10 @@ +{ + "op": "s_intersects", + "args": [ + { "property": "geometry" }, + { + "type": "Point", + "coordinates": [ 36.319836, 32.288087 ] + } + ] +} diff --git a/tests/data/json/clause7_10.json b/tests/data/json/clause7_10.json new file mode 100644 index 0000000..335b9f3 --- /dev/null +++ b/tests/data/json/clause7_10.json @@ -0,0 +1,19 @@ +{ + "op": "s_crosses", + "args": [ + { "property": "road" }, + { + "type": "Polygon", + "coordinates": [ + [ + [ 43.7286, -79.2986 ], [ 43.7311, -79.2996 ], [ 43.7323, -79.2972 ], + [ 43.7326, -79.2971 ], [ 43.7350, -79.2981 ], [ 43.7350, -79.2982 ], + [ 43.7352, -79.2982 ], [ 43.7357, -79.2956 ], [ 43.7337, -79.2948 ], + [ 43.7343, -79.2933 ], [ 43.7339, -79.2923 ], [ 43.7327, -79.2947 ], + [ 43.7320, -79.2942 ], [ 43.7322, -79.2937 ], [ 43.7306, -79.2930 ], + [ 43.7303, -79.2930 ], [ 43.7299, -79.2928 ], [ 43.7286, -79.2986 ] + ] + ] + } + ] +} diff --git a/tests/data/json/clause7_12.json b/tests/data/json/clause7_12.json new file mode 100644 index 0000000..bbef8c6 --- /dev/null +++ b/tests/data/json/clause7_12.json @@ -0,0 +1,7 @@ +{ + "op": "t_intersects", + "args": [ + { "property": "event_time" }, + { "interval": [ "1969-07-16T05:32:00Z", "1969-07-24T16:50:35Z" ] } + ] +} diff --git a/tests/data/json/clause7_13.json b/tests/data/json/clause7_13.json new file mode 100644 index 0000000..19d6aaa --- /dev/null +++ b/tests/data/json/clause7_13.json @@ -0,0 +1,7 @@ +{ + "op": "t_during", + "args": [ + { "interval": [ { "property": "touchdown" }, { "property": "liftOff" } ] }, + { "interval": [ "1969-07-16T13:32:00Z", "1969-07-24T16:50:35Z" ] } + ] +} diff --git a/tests/data/json/clause7_15.json b/tests/data/json/clause7_15.json new file mode 100644 index 0000000..46b6543 --- /dev/null +++ b/tests/data/json/clause7_15.json @@ -0,0 +1,7 @@ +{ + "op": "a_contains", + "args": [ + { "property": "layer:ids" }, + [ "layers-ca", "layers-us" ] + ] +} diff --git a/tests/data/json/clause7_16.json b/tests/data/json/clause7_16.json new file mode 100644 index 0000000..cfe4f0a --- /dev/null +++ b/tests/data/json/clause7_16.json @@ -0,0 +1,26 @@ +{ + "op": "s_crosses", + "args": [ + { + "type": "LineString", + "coordinates": [ + [ 43.72992, -79.2998 ], [ 43.73005, -79.2991 ], [ 43.73006, -79.2984 ], + [ 43.73140, -79.2956 ], [ 43.73259, -79.2950 ], [ 43.73266, -79.2945 ], + [ 43.73320, -79.2936 ], [ 43.73378, -79.2936 ], [ 43.73486, -79.2917 ] + ] + }, + { + "type": "Polygon", + "coordinates": [ + [ + [ 43.7286, -79.2986 ], [ 43.7311, -79.2996 ], [ 43.7323, -79.2972 ], + [ 43.7326, -79.2971 ], [ 43.7350, -79.2981 ], [ 43.7350, -79.2982 ], + [ 43.7352, -79.2982 ], [ 43.7357, -79.2956 ], [ 43.7337, -79.2948 ], + [ 43.7343, -79.2933 ], [ 43.7339, -79.2923 ], [ 43.7327, -79.2947 ], + [ 43.7320, -79.2942 ], [ 43.7322, -79.2937 ], [ 43.7306, -79.2930 ], + [ 43.7303, -79.2930 ], [ 43.7299, -79.2928 ], [ 43.7286, -79.2986 ] + ] + ] + } + ] +} diff --git a/tests/data/json/clause7_17.json b/tests/data/json/clause7_17.json new file mode 100644 index 0000000..24f0adc --- /dev/null +++ b/tests/data/json/clause7_17.json @@ -0,0 +1,7 @@ +{ + "op": "t_during", + "args": [ + { "interval": [ "1969-07-20T20:17:40Z", "1969-07-21T17:54:00Z" ] }, + { "interval": [ "1969-07-16T13:32:00Z", "1969-07-24T16:50:35Z" ] } + ] +} diff --git a/tests/data/json/clause7_18.json b/tests/data/json/clause7_18.json new file mode 100644 index 0000000..1a72be1 --- /dev/null +++ b/tests/data/json/clause7_18.json @@ -0,0 +1,16 @@ +{ + "op": "s_within", + "args": [ + { "property": "road" }, + { + "function": { + "name": "Buffer", + "args": [ + { "property": "geometry" }, + 10, + "m" + ] + } + } + ] +} diff --git a/tests/data/json/clause7_19.json b/tests/data/json/clause7_19.json new file mode 100644 index 0000000..d9b785c --- /dev/null +++ b/tests/data/json/clause7_19.json @@ -0,0 +1,13 @@ +{ + "op": ">", + "args": [ + { "property": "vehicle_height" }, + { + "op": "-", + "args": [ + { "property": "bridge_clearance" }, + 1 + ] + } + ] +} diff --git a/tests/data/json/example01.json b/tests/data/json/example01.json new file mode 100644 index 0000000..443a0a9 --- /dev/null +++ b/tests/data/json/example01.json @@ -0,0 +1,7 @@ +{ + "op": "=", + "args": [ + { "property": "landsat:scene_id" }, + "LC82030282019133LGN00" + ] +} diff --git a/tests/data/json/example02.json b/tests/data/json/example02.json new file mode 100644 index 0000000..ced9d24 --- /dev/null +++ b/tests/data/json/example02.json @@ -0,0 +1,7 @@ +{ + "op": "like", + "args": [ + { "property": "eo:instrument" }, + "OLI%" + ] +} diff --git a/tests/data/json/example03.json b/tests/data/json/example03.json new file mode 100644 index 0000000..fc98d5e --- /dev/null +++ b/tests/data/json/example03.json @@ -0,0 +1,7 @@ +{ + "op": "in", + "args": [ + { "property": "landsat:wrs_path" }, + [ "153", "154", "15X" ] + ] +} diff --git a/tests/data/json/example04.json b/tests/data/json/example04.json new file mode 100644 index 0000000..4b56541 --- /dev/null +++ b/tests/data/json/example04.json @@ -0,0 +1,26 @@ +{ + "op": "and", + "args": [ + { + "op": "<", + "args": [ + { "property": "eo:cloud_cover" }, + 0.1 + ] + }, + { + "op": "=", + "args": [ + { "property": "landsat:wrs_row" }, + 28 + ] + }, + { + "op": "=", + "args": [ + { "property": "landsat:wrs_path" }, + 203 + ] + } + ] +} diff --git a/tests/data/json/example05a.json b/tests/data/json/example05a.json new file mode 100644 index 0000000..8d5bc34 --- /dev/null +++ b/tests/data/json/example05a.json @@ -0,0 +1,19 @@ +{ + "op": "or", + "args": [ + { + "op": "=", + "args": [ + { "property": "eo:cloud_cover" }, + 0.1 + ] + }, + { + "op": "=", + "args": [ + { "property": "eo:cloud_cover" }, + 0.2 + ] + } + ] +} diff --git a/tests/data/json/example05b.json b/tests/data/json/example05b.json new file mode 100644 index 0000000..5701ac3 --- /dev/null +++ b/tests/data/json/example05b.json @@ -0,0 +1,7 @@ +{ + "op": "in", + "args": [ + { "property": "eo:cloud_cover" }, + [ 0.1, 0.2 ] + ] +} diff --git a/tests/data/json/example06a.json b/tests/data/json/example06a.json new file mode 100644 index 0000000..8adeb42 --- /dev/null +++ b/tests/data/json/example06a.json @@ -0,0 +1,26 @@ +{ + "op": "and", + "args": [ + { + "op": "between", + "args": [ + { "property": "eo:cloud_cover" }, + 0.1, 0.2 + ] + }, + { + "op": "=", + "args": [ + { "property": "landsat:wrs_row" }, + 28 + ] + }, + { + "op": "=", + "args": [ + { "property": "landsat:wrs_path" }, + 203 + ] + } + ] +} diff --git a/tests/data/json/example06b.json b/tests/data/json/example06b.json new file mode 100644 index 0000000..e91f8c7 --- /dev/null +++ b/tests/data/json/example06b.json @@ -0,0 +1,33 @@ +{ + "op": "and", + "args": [ + { + "op": ">=", + "args": [ + { "property": "eo:cloud_cover" }, + 0.1 + ] + }, + { + "op": "<=", + "args": [ + { "property": "eo:cloud_cover" }, + 0.2 + ] + }, + { + "op": "=", + "args": [ + { "property": "landsat:wrs_row" }, + 28 + ] + }, + { + "op": "=", + "args": [ + { "property": "landsat:wrs_path" }, + 203 + ] + } + ] +} diff --git a/tests/data/json/example07.json b/tests/data/json/example07.json new file mode 100644 index 0000000..d3b9cd6 --- /dev/null +++ b/tests/data/json/example07.json @@ -0,0 +1,35 @@ +{ + "op": "and", + "args": [ + { + "op": "like", + "args": [ + { "property": "eo:instrument" }, + "OLI%" + ] + }, + { + "op": "s_intersects", + "args": [ + { "property": "footprint" }, + { + "type": "Polygon", + "coordinates": [ + [ [ 43.5845, -79.5442 ], + [ 43.6079, -79.4893 ], + [ 43.5677, -79.4632 ], + [ 43.6129, -79.3925 ], + [ 43.6223, -79.3238 ], + [ 43.6576, -79.3163 ], + [ 43.7945, -79.1178 ], + [ 43.8144, -79.1542 ], + [ 43.8555, -79.1714 ], + [ 43.7509, -79.639 ], + [ 43.5845, -79.5442 ] + ] + ] + } + ] + } + ] +} diff --git a/tests/data/json/example08.json b/tests/data/json/example08.json new file mode 100644 index 0000000..f149412 --- /dev/null +++ b/tests/data/json/example08.json @@ -0,0 +1,48 @@ +{ + "op": "and", + "args": [ + { + "op": "=", + "args": [ + { "property": "beamMode" }, + "ScanSAR Narrow" + ] + }, + { + "op": "=", + "args": [ + { "property": "swathDirection" }, + "ascending" + ] + }, + { + "op": "=", + "args": [ + { "property": "polarization" }, + "HH+VV+HV+VH" + ] + }, + { + "op": "s_intersects", + "args": [ + { + "property": "footprint" + }, + { + "type": "Polygon", + "coordinates": [ + [ [ -77.117938, 38.936860 ], + [ -77.040604, 39.995648 ], + [ -76.910536, 38.892912 ], + [ -77.039359, 38.791753 ], + [ -77.047906, 38.841462 ], + [ -77.034183, 38.840655 ], + [ -77.033142, 38.857490 ], + [ -77.117938, 38.936860 ] + ] + ] + } + ] + } + ] +} diff --git a/tests/data/json/example09.json b/tests/data/json/example09.json new file mode 100644 index 0000000..60d0c83 --- /dev/null +++ b/tests/data/json/example09.json @@ -0,0 +1,7 @@ +{ + "op": ">", + "args": [ + { "property": "floors" }, + 5 + ] +} diff --git a/tests/data/json/example10.json b/tests/data/json/example10.json new file mode 100644 index 0000000..8a0db02 --- /dev/null +++ b/tests/data/json/example10.json @@ -0,0 +1,7 @@ +{ + "op": "<=", + "args": [ + { "property": "taxes" }, + 500 + ] +} diff --git a/tests/data/json/example11.json b/tests/data/json/example11.json new file mode 100644 index 0000000..d605fe1 --- /dev/null +++ b/tests/data/json/example11.json @@ -0,0 +1,7 @@ +{ + "op": "like", + "args": [ + { "property": "owner" }, + "%Jones%" + ] +} diff --git a/tests/data/json/example12.json b/tests/data/json/example12.json new file mode 100644 index 0000000..e7bca46 --- /dev/null +++ b/tests/data/json/example12.json @@ -0,0 +1,7 @@ +{ + "op": "like", + "args": [ + { "property": "owner" }, + "Mike%" + ] +} diff --git a/tests/data/json/example13.json b/tests/data/json/example13.json new file mode 100644 index 0000000..871284b --- /dev/null +++ b/tests/data/json/example13.json @@ -0,0 +1,12 @@ +{ + "op": "not", + "args": [ + { + "op": "like", + "args": [ + { "property": "owner" }, + "%Mike%" + ] + } + ] +} diff --git a/tests/data/json/example14.json b/tests/data/json/example14.json new file mode 100644 index 0000000..129dce8 --- /dev/null +++ b/tests/data/json/example14.json @@ -0,0 +1,7 @@ +{ + "op": "=", + "args": [ + { "property": "swimming_pool" }, + true + ] +} diff --git a/tests/data/json/example15.json b/tests/data/json/example15.json new file mode 100644 index 0000000..588e5e1 --- /dev/null +++ b/tests/data/json/example15.json @@ -0,0 +1,19 @@ +{ + "op": "and", + "args": [ + { + "op": ">", + "args": [ + { "property": "floors" }, + 5 + ] + }, + { + "op": "=", + "args": [ + { "property": "swimming_pool" }, + true + ] + } + ] +} diff --git a/tests/data/json/example16.json b/tests/data/json/example16.json new file mode 100644 index 0000000..c56fc66 --- /dev/null +++ b/tests/data/json/example16.json @@ -0,0 +1,38 @@ +{ + "op": "and", + "args": [ + { + "op": "=", + "args": [ + { "property": "swimming_pool" }, + true + ] + }, + { + "op": "or", + "args": [ + { + "op": ">", + "args": [ + { "property": "floors" }, + 5 + ] + }, + { + "op": "like", + "args": [ + { "property": "material" }, + "brick%" + ] + }, + { + "op": "like", + "args": [ + { "property": "material" }, + "%brick" + ] + } + ] + } + ] +} diff --git a/tests/data/json/example17.json b/tests/data/json/example17.json new file mode 100644 index 0000000..67b4bb4 --- /dev/null +++ b/tests/data/json/example17.json @@ -0,0 +1,31 @@ +{ + "op": "or", + "args": [ + { + "op": "and", + "args": [ + { + "op": ">", + "args": [ + { "property": "floors" }, + 5 + ] + }, + { + "op": "=", + "args": [ + { "property": "material" }, + "brick" + ] + } + ] + }, + { + "op": "=", + "args": [ + { "property": "swimming_pool" }, + true + ] + } + ] +} diff --git a/tests/data/json/example18.json b/tests/data/json/example18.json new file mode 100644 index 0000000..62be7de --- /dev/null +++ b/tests/data/json/example18.json @@ -0,0 +1,24 @@ +{ + "op": "or", + "args": [ + { + "op": "not", + "args": [ + { + "op": "<", + "args": [ + { "property": "floors" }, + 5 + ] + } + ] + }, + { + "op": "=", + "args": [ + { "property": "swimming_pool" }, + true + ] + } + ] +} diff --git a/tests/data/json/example19.json b/tests/data/json/example19.json new file mode 100644 index 0000000..ecf9c31 --- /dev/null +++ b/tests/data/json/example19.json @@ -0,0 +1,31 @@ +{ + "op": "and", + "args": [ + { + "op": "or", + "args": [ + { + "op": "like", + "args": [ + { "property": "owner" }, + "mike%" + ] + }, + { + "op": "like", + "args": [ + { "property": "owner" }, + "Mike%" + ] + } + ] + }, + { + "op": "<", + "args": [ + { "property": "floors" }, + 4 + ] + } + ] +} diff --git a/tests/data/json/example20.json b/tests/data/json/example20.json new file mode 100644 index 0000000..9968d5e --- /dev/null +++ b/tests/data/json/example20.json @@ -0,0 +1,7 @@ +{ + "op": "t_before", + "args": [ + { "property": "built" }, + { "date": "2015-01-01" } + ] +} diff --git a/tests/data/json/example21.json b/tests/data/json/example21.json new file mode 100644 index 0000000..82f86cd --- /dev/null +++ b/tests/data/json/example21.json @@ -0,0 +1,7 @@ +{ + "op": "t_after", + "args": [ + { "property": "built" }, + { "date": "2012-06-05" } + ] +} diff --git a/tests/data/json/example22.json b/tests/data/json/example22.json new file mode 100644 index 0000000..34033d1 --- /dev/null +++ b/tests/data/json/example22.json @@ -0,0 +1,7 @@ +{ + "op": "t_during", + "args": [ + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] }, + { "interval": [ "2017-06-10T07:30:00Z", "2017-06-11T10:30:00Z" ] } + ] +} diff --git a/tests/data/json/example23.json b/tests/data/json/example23.json new file mode 100644 index 0000000..b60365d --- /dev/null +++ b/tests/data/json/example23.json @@ -0,0 +1,7 @@ +{ + "op": "s_within", + "args": [ + { "property": "location" }, + { "bbox": [ -118, 33.8, -117.9, 34 ] } + ] +} diff --git a/tests/data/json/example24.json b/tests/data/json/example24.json new file mode 100644 index 0000000..41e5b20 --- /dev/null +++ b/tests/data/json/example24.json @@ -0,0 +1,10 @@ +{ + "op": "s_intersects", + "args": [ + { "property": "geometry" }, + { + "type": "Polygon", + "coordinates": [ [ [ -10, -10 ], [ 10, -10 ], [ 10, 10 ], [ -10, -10 ] ] ] + } + ] +} diff --git a/tests/data/json/example25.json b/tests/data/json/example25.json new file mode 100644 index 0000000..4233215 --- /dev/null +++ b/tests/data/json/example25.json @@ -0,0 +1,19 @@ +{ + "op": "and", + "args": [ + { + "op": ">", + "args": [ + { "property": "floors" }, + 5 + ] + }, + { + "op": "s_within", + "args": [ + { "property": "geometry" }, + { "bbox": [ -118, 33.8, -117.9, 34 ] } + ] + } + ] +} diff --git a/tests/data/json/example26.json b/tests/data/json/example26.json new file mode 100644 index 0000000..d46b116 --- /dev/null +++ b/tests/data/json/example26.json @@ -0,0 +1,10 @@ +{ + "op": "in", + "args": [ + { "op": "casei", "args": [ { "property": "road_class" } ] }, + [ + { "op": "casei", "args": [ "Οδος" ] }, + { "op": "casei", "args": [ "Straße" ] } + ] + ] +} diff --git a/tests/data/json/example27.json b/tests/data/json/example27.json new file mode 100644 index 0000000..0c94cbc --- /dev/null +++ b/tests/data/json/example27.json @@ -0,0 +1,7 @@ +{ + "op": "=", + "args": [ + { "op": "accenti", "args": [ { "property": "etat_vol" } ] }, + { "op": "accenti", "args": [ "débárquér" ] } + ] +} diff --git a/tests/data/json/example28.json b/tests/data/json/example28.json new file mode 100644 index 0000000..d2e5e48 --- /dev/null +++ b/tests/data/json/example28.json @@ -0,0 +1,7 @@ +{ + "op": "like", + "args": [ + { "op": "casei", "args": [ { "property": "geophys:SURVEY_NAME" } ] }, + { "op": "casei", "args": [ "%calcutta%" ] } + ] +} diff --git a/tests/data/json/example29.json b/tests/data/json/example29.json new file mode 100644 index 0000000..dbb4422 --- /dev/null +++ b/tests/data/json/example29.json @@ -0,0 +1,7 @@ +{ + "op": "=", + "args": [ + { "property": "id" }, + "fa7e1920-9107-422d-a3db-c468cbc5d6df" + ] +} diff --git a/tests/data/json/example30.json b/tests/data/json/example30.json new file mode 100644 index 0000000..6056f60 --- /dev/null +++ b/tests/data/json/example30.json @@ -0,0 +1,7 @@ +{ + "op": "<>", + "args": [ + { "property": "id" }, + "fa7e1920-9107-422d-a3db-c468cbc5d6df" + ] +} diff --git a/tests/data/json/example31.json b/tests/data/json/example31.json new file mode 100644 index 0000000..6c2c03a --- /dev/null +++ b/tests/data/json/example31.json @@ -0,0 +1,7 @@ +{ + "op": "<", + "args": [ + { "property": "value" }, + 10 + ] +} diff --git a/tests/data/json/example32.json b/tests/data/json/example32.json new file mode 100644 index 0000000..ef1b6ca --- /dev/null +++ b/tests/data/json/example32.json @@ -0,0 +1,7 @@ +{ + "op": ">", + "args": [ + { "property": "value" }, + 10 + ] +} diff --git a/tests/data/json/example33.json b/tests/data/json/example33.json new file mode 100644 index 0000000..12cfdc2 --- /dev/null +++ b/tests/data/json/example33.json @@ -0,0 +1,7 @@ +{ + "op": "<=", + "args": [ + { "property": "value" }, + 10 + ] +} diff --git a/tests/data/json/example34.json b/tests/data/json/example34.json new file mode 100644 index 0000000..a8d6ca2 --- /dev/null +++ b/tests/data/json/example34.json @@ -0,0 +1,7 @@ +{ + "op": ">=", + "args": [ + { "property": "value" }, + 10 + ] +} diff --git a/tests/data/json/example35.json b/tests/data/json/example35.json new file mode 100644 index 0000000..3b6fee0 --- /dev/null +++ b/tests/data/json/example35.json @@ -0,0 +1,7 @@ +{ + "op": "like", + "args": [ + { "property": "name" }, + "foo%" + ] +} diff --git a/tests/data/json/example36.json b/tests/data/json/example36.json new file mode 100644 index 0000000..273ace5 --- /dev/null +++ b/tests/data/json/example36.json @@ -0,0 +1,12 @@ +{ + "op": "not", + "args": [ + { + "op": "like", + "args": [ + { "property": "name" }, + "foo%" + ] + } + ] +} diff --git a/tests/data/json/example37.json b/tests/data/json/example37.json new file mode 100644 index 0000000..2ec6db3 --- /dev/null +++ b/tests/data/json/example37.json @@ -0,0 +1,7 @@ +{ + "op": "between", + "args": [ + { "property": "value" }, + 10, 20 + ] +} diff --git a/tests/data/json/example38.json b/tests/data/json/example38.json new file mode 100644 index 0000000..c729fd3 --- /dev/null +++ b/tests/data/json/example38.json @@ -0,0 +1,12 @@ +{ + "op": "not", + "args": [ + { + "op": "between", + "args": [ + { "property": "value" }, + 10, 20 + ] + } + ] +} diff --git a/tests/data/json/example39.json b/tests/data/json/example39.json new file mode 100644 index 0000000..b24ff97 --- /dev/null +++ b/tests/data/json/example39.json @@ -0,0 +1,7 @@ +{ + "op": "in", + "args": [ + { "property": "value" }, + [ 1.0, 2.0, 3.0 ] + ] +} diff --git a/tests/data/json/example40.json b/tests/data/json/example40.json new file mode 100644 index 0000000..a4dc7f8 --- /dev/null +++ b/tests/data/json/example40.json @@ -0,0 +1,12 @@ +{ + "op": "not", + "args": [ + { + "op": "in", + "args": [ + { "property": "value" }, + [ "a", "b", "c" ] + ] + } + ] +} diff --git a/tests/data/json/example41.json b/tests/data/json/example41.json new file mode 100644 index 0000000..bb31b49 --- /dev/null +++ b/tests/data/json/example41.json @@ -0,0 +1,4 @@ +{ + "op": "isNull", + "args": [ { "property": "value" } ] +} diff --git a/tests/data/json/filter14.json b/tests/data/json/example42.json similarity index 62% rename from tests/data/json/filter14.json rename to tests/data/json/example42.json index 24a8ac3..29c3bb0 100644 --- a/tests/data/json/filter14.json +++ b/tests/data/json/example42.json @@ -3,7 +3,7 @@ "args": [ { "op": "isNull", - "args": [{ "property": "value" }] + "args": [ { "property": "value" } ] } ] } diff --git a/tests/data/json/filter15.json b/tests/data/json/example43.json similarity index 51% rename from tests/data/json/filter15.json rename to tests/data/json/example43.json index 10fdabf..04986cb 100644 --- a/tests/data/json/filter15.json +++ b/tests/data/json/example43.json @@ -6,13 +6,19 @@ "args": [ { "op": "like", - "args": [{ "property": "name" }, "foo%"] + "args": [ + { "property": "name" }, + "foo%" + ] } ] }, { "op": ">", - "args": [{ "property": "value" }, 10] + "args": [ + { "property": "value" }, + 10 + ] } ] } diff --git a/tests/data/json/example44.json b/tests/data/json/example44.json new file mode 100644 index 0000000..65fdbc4 --- /dev/null +++ b/tests/data/json/example44.json @@ -0,0 +1,16 @@ +{ + "op": "or", + "args": [ + { + "op": "isNull", + "args": [ { "property": "value" } ] + }, + { + "op": "between", + "args": [ + { "property": "value" }, + 10, 20 + ] + } + ] +} diff --git a/tests/data/json/filter17.json b/tests/data/json/example45.json similarity index 51% rename from tests/data/json/filter17.json rename to tests/data/json/example45.json index 04a8f47..e776024 100644 --- a/tests/data/json/filter17.json +++ b/tests/data/json/example45.json @@ -2,6 +2,6 @@ "op": "s_intersects", "args": [ { "property": "geometry" }, - { "bbox": [-128.098193, -1.1, -99999.0, 180.0, 90.0, 100000.0] } + { "bbox": [ -128.098193, -1.1, -99999.0, 180.0, 90.0, 100000.0 ] } ] } diff --git a/tests/data/json/example46.json b/tests/data/json/example46.json new file mode 100644 index 0000000..0d83f42 --- /dev/null +++ b/tests/data/json/example46.json @@ -0,0 +1,16 @@ +{ + "op": "s_equals", + "args": [ + { + "type": "Polygon", + "coordinates": [ [ [ -0.333333, 89.0 ], + [ -102.723546, -0.5 ], + [ -179.0, -89.0 ], + [ -1.9, 89.0 ], + [ -0.0, 89.0 ], + [ 2.00001, -1.9 ], + [ -0.333333, 89.0 ] ] ] + }, + { "property": "geometry" } + ] +} diff --git a/tests/data/json/example47.json b/tests/data/json/example47.json new file mode 100644 index 0000000..b856c4b --- /dev/null +++ b/tests/data/json/example47.json @@ -0,0 +1,13 @@ +{ + "op": "s_disjoint", + "args": [ + { "property": "geometry" }, + { + "type": "MultiPolygon", + "coordinates": [ [ [ [ 144.022387, 45.176126 ], + [ -1.1, 0.0 ], + [ 180.0, 47.808086 ], + [ 144.022387, 45.176126 ] ] ] ] + } + ] +} diff --git a/tests/data/json/example48.json b/tests/data/json/example48.json new file mode 100644 index 0000000..5945b26 --- /dev/null +++ b/tests/data/json/example48.json @@ -0,0 +1,16 @@ +{ + "op": "s_touches", + "args": [ + { "property": "geometry" }, + { + "type": "MultiLineString", + "coordinates": [ [ [ -1.9, -0.99999 ], + [ 75.292574, 1.5 ], + [ -0.5, -4.016458 ], + [ -31.708594, -74.743801 ], + [ 179.0, -90.0 ] ], + [ [ -1.9, -1.1 ], + [ 1.5, 8.547371 ] ] ] + } + ] +} diff --git a/tests/data/json/example49.json b/tests/data/json/example49.json new file mode 100644 index 0000000..6eb04d3 --- /dev/null +++ b/tests/data/json/example49.json @@ -0,0 +1,17 @@ +{ + "op": "s_within", + "args": [ + { + "type": "Polygon", + "coordinates": [ [ [ -49.88024, 0.5, -75993.341684 ], + [ -1.5, -0.99999, -100000.0 ], + [ 0.0, 0.5, -0.333333 ], + [ -49.88024, 0.5, -75993.341684 ] ], + [ [ -65.887123, 2.00001, -100000.0 ], + [ 0.333333, -53.017711, -79471.332949 ], + [ 180.0, 0.0, 1852.616704 ], + [ -65.887123, 2.00001, -100000.0 ] ] ] + }, + { "property": "geometry" } + ] +} diff --git a/tests/data/json/filter22.json b/tests/data/json/example50.json similarity index 57% rename from tests/data/json/filter22.json rename to tests/data/json/example50.json index 88e108f..f444c35 100644 --- a/tests/data/json/filter22.json +++ b/tests/data/json/example50.json @@ -2,6 +2,6 @@ "op": "s_overlaps", "args": [ { "property": "geometry" }, - { "bbox": [-179.912109, 1.9, 180.0, 16.897016] } + { "bbox": [ -179.912109, 1.9, 180.0, 16.897016 ] } ] } diff --git a/tests/data/json/example51.json b/tests/data/json/example51.json new file mode 100644 index 0000000..af43407 --- /dev/null +++ b/tests/data/json/example51.json @@ -0,0 +1,17 @@ +{ + "op": "s_crosses", + "args": [ + { "property": "geometry" }, + { + "type": "LineString", + "coordinates": [ [ 172.03086, 1.5 ], + [ 1.1, -90.0 ], + [ -159.757695, 0.99999 ], + [ -180.0, 0.5 ], + [ -12.111235, 81.336403 ], + [ -0.5, 64.43958 ], + [ 0.0, 81.991815 ], + [ -155.93831, 90.0 ] ] + } + ] +} diff --git a/tests/data/json/filter24.json b/tests/data/json/example52.json similarity index 70% rename from tests/data/json/filter24.json rename to tests/data/json/example52.json index 9589000..b2412b3 100644 --- a/tests/data/json/filter24.json +++ b/tests/data/json/example52.json @@ -4,7 +4,7 @@ { "property": "geometry" }, { "type": "Point", - "coordinates": [-3.508362, -1.754181] + "coordinates": [ -3.508362, -1.754181 ] } ] } diff --git a/tests/data/json/example53.json b/tests/data/json/example53.json new file mode 100644 index 0000000..bc5dd7f --- /dev/null +++ b/tests/data/json/example53.json @@ -0,0 +1,7 @@ +{ + "op": "t_after", + "args": [ + { "property": "updated_at" }, + { "date": "2010-02-10" } + ] +} diff --git a/tests/data/json/filter26.json b/tests/data/json/example54.json similarity index 100% rename from tests/data/json/filter26.json rename to tests/data/json/example54.json diff --git a/tests/data/json/example55.json b/tests/data/json/example55.json new file mode 100644 index 0000000..2bd99f3 --- /dev/null +++ b/tests/data/json/example55.json @@ -0,0 +1,8 @@ +{ + "op": "t_contains", + "args": [ + { "interval": [ "2000-01-01T00:00:00Z", "2005-01-10T01:01:01.393216Z" ] }, + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] } + + ] +} diff --git a/tests/data/json/example56.json b/tests/data/json/example56.json new file mode 100644 index 0000000..3568235 --- /dev/null +++ b/tests/data/json/example56.json @@ -0,0 +1,7 @@ +{ + "op": "t_disjoint", + "args": [ + { "interval": [ "..", "2005-01-10T01:01:01.393216Z" ] }, + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] } + ] +} diff --git a/tests/data/json/example57.json b/tests/data/json/example57.json new file mode 100644 index 0000000..63d460d --- /dev/null +++ b/tests/data/json/example57.json @@ -0,0 +1,8 @@ +{ + "op": "t_during", + "args": [ + {"interval": [{ "property": "starts_at" }, { "property": "ends_at" }]}, + {"interval": ["2005-01-10", "2010-02-10"] + } + ] +} diff --git a/tests/data/json/example58.json b/tests/data/json/example58.json new file mode 100644 index 0000000..ede6c7a --- /dev/null +++ b/tests/data/json/example58.json @@ -0,0 +1,7 @@ +{ + "op": "t_equals", + "args": [ + { "property": "updated_at" }, + { "date": "1851-04-29" } + ] +} diff --git a/tests/data/json/example59.json b/tests/data/json/example59.json new file mode 100644 index 0000000..4d479c0 --- /dev/null +++ b/tests/data/json/example59.json @@ -0,0 +1,7 @@ +{ + "op": "t_finishedBy", + "args": [ + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] }, + { "interval": [ "1991-10-07T08:21:06.393262Z", "2010-02-10T05:29:20.073225Z" ] } + ] +} diff --git a/tests/data/json/example60.json b/tests/data/json/example60.json new file mode 100644 index 0000000..423d24f --- /dev/null +++ b/tests/data/json/example60.json @@ -0,0 +1,7 @@ +{ + "op": "t_finishes", + "args": [ + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] }, + { "interval": [ "1991-10-07", "2010-02-10T05:29:20.073225Z" ] } + ] +} diff --git a/tests/data/json/example61.json b/tests/data/json/example61.json new file mode 100644 index 0000000..ca95d57 --- /dev/null +++ b/tests/data/json/example61.json @@ -0,0 +1,7 @@ +{ + "op": "t_intersects", + "args": [ + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] }, + { "interval": [ "1991-10-07T08:21:06.393262Z", "2010-02-10T05:29:20.073225Z" ] } + ] +} diff --git a/tests/data/json/example62.json b/tests/data/json/example62.json new file mode 100644 index 0000000..23360fb --- /dev/null +++ b/tests/data/json/example62.json @@ -0,0 +1,7 @@ +{ + "op": "t_meets", + "args": [ + { "interval": [ "2005-01-10", "2010-02-10" ] }, + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] } + ] +} diff --git a/tests/data/json/example63.json b/tests/data/json/example63.json new file mode 100644 index 0000000..a4f7788 --- /dev/null +++ b/tests/data/json/example63.json @@ -0,0 +1,7 @@ +{ + "op": "t_metBy", + "args": [ + { "interval": [ "2010-02-10T05:29:20.073225Z", "2010-10-07" ] }, + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] } + ] +} diff --git a/tests/data/json/example64.json b/tests/data/json/example64.json new file mode 100644 index 0000000..51055eb --- /dev/null +++ b/tests/data/json/example64.json @@ -0,0 +1,7 @@ +{ + "op": "t_overlappedBy", + "args": [ + { "interval": [ "1991-10-07T08:21:06.393262Z", "2010-02-10T05:29:20.073225Z" ] }, + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] } + ] +} diff --git a/tests/data/json/example65.json b/tests/data/json/example65.json new file mode 100644 index 0000000..ff74921 --- /dev/null +++ b/tests/data/json/example65.json @@ -0,0 +1,7 @@ +{ + "op": "t_overlaps", + "args": [ + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] }, + { "interval": [ "1991-10-07T08:21:06.393262Z", "1992-10-09T08:08:08.393473Z" ] } + ] +} diff --git a/tests/data/json/example66.json b/tests/data/json/example66.json new file mode 100644 index 0000000..118ba30 --- /dev/null +++ b/tests/data/json/example66.json @@ -0,0 +1,7 @@ +{ + "op": "t_startedBy", + "args": [ + { "interval": [ "1991-10-07T08:21:06.393262Z", "2010-02-10T05:29:20.073225Z" ] }, + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] } + ] +} diff --git a/tests/data/json/example67.json b/tests/data/json/example67.json new file mode 100644 index 0000000..551cf2c --- /dev/null +++ b/tests/data/json/example67.json @@ -0,0 +1,7 @@ +{ + "op": "t_starts", + "args": [ + { "interval": [ { "property": "starts_at" }, { "property": "ends_at" } ] }, + { "interval": [ "1991-10-07T08:21:06.393262Z", ".." ] } + ] +} diff --git a/tests/data/json/filter40.json b/tests/data/json/example68.json similarity index 69% rename from tests/data/json/filter40.json rename to tests/data/json/example68.json index 76748a1..1795dec 100644 --- a/tests/data/json/filter40.json +++ b/tests/data/json/example68.json @@ -4,7 +4,7 @@ { "function": { "name": "Foo", - "args": [{ "property": "geometry" }] + "args": [ { "property": "geometry" } ] } }, true diff --git a/tests/data/json/filter41.json b/tests/data/json/example69.json similarity index 61% rename from tests/data/json/filter41.json rename to tests/data/json/example69.json index 6bfad7e..320867a 100644 --- a/tests/data/json/filter41.json +++ b/tests/data/json/example69.json @@ -5,7 +5,7 @@ { "function": { "name": "Bar", - "args": [{ "property": "geometry" }, 100, "a", "b", false] + "args": [ { "property": "geometry" }, 100, "a", "b", false ] } } ] diff --git a/tests/data/json/example70.json b/tests/data/json/example70.json new file mode 100644 index 0000000..032569f --- /dev/null +++ b/tests/data/json/example70.json @@ -0,0 +1,7 @@ +{ + "op": "=", + "args": [ + { "op": "accenti", "args": [ { "property": "owner" } ] }, + { "op": "accenti", "args": [ "Beyoncé" ] } + ] +} diff --git a/tests/data/json/example71.json b/tests/data/json/example71.json new file mode 100644 index 0000000..184cde7 --- /dev/null +++ b/tests/data/json/example71.json @@ -0,0 +1,7 @@ +{ + "op": "=", + "args": [ + { "op": "casei", "args": [ { "property": "owner" } ] }, + { "op": "casei", "args": [ "somebody else" ] } + ] +} diff --git a/tests/data/json/filter44.json b/tests/data/json/example72.json similarity index 57% rename from tests/data/json/filter44.json rename to tests/data/json/example72.json index 527ed9d..e97cc2d 100644 --- a/tests/data/json/filter44.json +++ b/tests/data/json/example72.json @@ -4,7 +4,10 @@ { "property": "value" }, { "op": "+", - "args": [{ "property": "foo" }, 10] + "args": [ + { "property": "foo" }, + 10 + ] } ] } diff --git a/tests/data/json/filter45.json b/tests/data/json/example73.json similarity index 57% rename from tests/data/json/filter45.json rename to tests/data/json/example73.json index b3aea73..e436fc5 100644 --- a/tests/data/json/filter45.json +++ b/tests/data/json/example73.json @@ -4,7 +4,10 @@ { "property": "value" }, { "op": "-", - "args": [{ "property": "foo" }, 10] + "args": [ + { "property": "foo" }, + 10 + ] } ] } diff --git a/tests/data/json/filter46.json b/tests/data/json/example74.json similarity index 57% rename from tests/data/json/filter46.json rename to tests/data/json/example74.json index bc6f12d..5321438 100644 --- a/tests/data/json/filter46.json +++ b/tests/data/json/example74.json @@ -4,7 +4,10 @@ { "property": "value" }, { "op": "*", - "args": [22.1, { "property": "foo" }] + "args": [ + 22.1, + { "property": "foo" } + ] } ] } diff --git a/tests/data/json/filter47.json b/tests/data/json/example75.json similarity index 58% rename from tests/data/json/filter47.json rename to tests/data/json/example75.json index a6981bc..4bf7b7a 100644 --- a/tests/data/json/filter47.json +++ b/tests/data/json/example75.json @@ -4,7 +4,10 @@ { "property": "value" }, { "op": "/", - "args": [2, { "property": "foo" }] + "args": [ + 2, + { "property": "foo" } + ] } ] } diff --git a/tests/data/json/filter48.json b/tests/data/json/example76.json similarity index 68% rename from tests/data/json/filter48.json rename to tests/data/json/example76.json index f8b8c5f..32020f0 100644 --- a/tests/data/json/filter48.json +++ b/tests/data/json/example76.json @@ -4,7 +4,7 @@ { "property": "value" }, { "op": "^", - "args": [2, { "property": "foo" }] + "args": [ 2, { "property": "foo" } ] } ] } diff --git a/tests/data/json/filter49.json b/tests/data/json/example77.json similarity index 61% rename from tests/data/json/filter49.json rename to tests/data/json/example77.json index 3889d73..4486f90 100644 --- a/tests/data/json/filter49.json +++ b/tests/data/json/example77.json @@ -4,7 +4,7 @@ 0, { "op": "%", - "args": [{ "property": "foo" }, 2] + "args": [ { "property": "foo" }, 2 ] } ] } diff --git a/tests/data/json/filter50.json b/tests/data/json/example78.json similarity index 62% rename from tests/data/json/filter50.json rename to tests/data/json/example78.json index 799ac20..f5a6944 100644 --- a/tests/data/json/filter50.json +++ b/tests/data/json/example78.json @@ -4,7 +4,7 @@ 1, { "op": "div", - "args": [{ "property": "foo" }, 2] + "args": [ { "property": "foo" }, 2 ] } ] } diff --git a/tests/data/json/example79.json b/tests/data/json/example79.json new file mode 100644 index 0000000..e331163 --- /dev/null +++ b/tests/data/json/example79.json @@ -0,0 +1,7 @@ +{ + "op": "a_containedBy", + "args": [ + { "property": "values" }, + [ "a", "b", "c" ] + ] +} diff --git a/tests/data/json/example80.json b/tests/data/json/example80.json new file mode 100644 index 0000000..bef0936 --- /dev/null +++ b/tests/data/json/example80.json @@ -0,0 +1,7 @@ +{ + "op": "a_contains", + "args": [ + { "property": "values" }, + [ "a", "b", "c" ] + ] +} diff --git a/tests/data/json/example81.json b/tests/data/json/example81.json new file mode 100644 index 0000000..4d35c75 --- /dev/null +++ b/tests/data/json/example81.json @@ -0,0 +1,7 @@ +{ + "op": "a_equals", + "args": [ + [ "a", true, 1.0, 8 ], + { "property": "values" } + ] +} diff --git a/tests/data/json/example82.json b/tests/data/json/example82.json new file mode 100644 index 0000000..1537ec2 --- /dev/null +++ b/tests/data/json/example82.json @@ -0,0 +1,7 @@ +{ + "op": "a_overlaps", + "args": [ + { "property": "values" }, + [ { "timestamp": "2012-08-10T05:30:00Z" }, { "date": "2010-02-10" }, false ] + ] +} diff --git a/tests/data/json/example83.json b/tests/data/json/example83.json new file mode 100644 index 0000000..16c2dc9 --- /dev/null +++ b/tests/data/json/example83.json @@ -0,0 +1,14 @@ +{ + "op": "s_equals", + "args": [ + { + "type": "MultiPoint", + "coordinates": [ [ 180.0, -0.5 ], + [ 179.0, -47.121701 ], + [ 180.0, -0.0 ], + [ 33.470475, -0.99999 ], + [ 179.0, -15.333062 ] ] + }, + { "property": "geometry" } + ] +} diff --git a/tests/data/json/example84.json b/tests/data/json/example84.json new file mode 100644 index 0000000..ab6b64a --- /dev/null +++ b/tests/data/json/example84.json @@ -0,0 +1,38 @@ +{ + "op": "s_equals", + "args": [ + { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [ 1.9, 2.00001 ] + }, + { + "type": "Point", + "coordinates": [ 0.0, -2.00001 ] + }, + { + "type": "MultiLineString", + "coordinates": [ [ [ -2.00001, -0.0 ], + [ -77.292642, -0.5 ], + [ -87.515626, -0.0 ], + [ -180.0, 12.502773 ], + [ 21.204842, -1.5 ], + [ -21.878857, -90.0 ] ] ] + }, + { + "type": "Point", + "coordinates": [ 1.9, 0.5 ] + }, + { + "type": "LineString", + "coordinates": [ [ 179.0, 1.179148 ], + [ -148.192487, -65.007816 ], + [ 0.5, 0.333333 ] ] + } + ] + }, + { "property": "geometry" } + ] +} diff --git a/tests/data/json/filter57.json b/tests/data/json/example85.json similarity index 74% rename from tests/data/json/filter57.json rename to tests/data/json/example85.json index 4eb3c72..cc442d1 100644 --- a/tests/data/json/filter57.json +++ b/tests/data/json/example85.json @@ -13,20 +13,20 @@ "args": [ { "op": "*", - "args": [-1, { "property": "foo" }] + "args": [ -1, { "property": "foo" } ] }, 2.0 ] }, { "op": "/", - "args": [{ "property": "bar" }, 6.1234] + "args": [ { "property": "bar" }, 6.1234 ] } ] }, { "op": "^", - "args": [{ "property": "x" }, 2.0] + "args": [ { "property": "x" }, 2.0 ] } ] } diff --git a/tests/data/json/example86.json b/tests/data/json/example86.json new file mode 100644 index 0000000..8d77339 --- /dev/null +++ b/tests/data/json/example86.json @@ -0,0 +1,7 @@ +{ + "op": "like", + "args": [ + { "property": "name" }, + { "op": "casei", "args": [ "FOO%" ] } + ] +} diff --git a/tests/data/json/filter01.json b/tests/data/json/filter01.json deleted file mode 100644 index d9d9e5f..0000000 --- a/tests/data/json/filter01.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "=", - "args": [{ "property": "id" }, "fa7e1920-9107-422d-a3db-c468cbc5d6df"] -} diff --git a/tests/data/json/filter02.json b/tests/data/json/filter02.json deleted file mode 100644 index e6ba023..0000000 --- a/tests/data/json/filter02.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "<>", - "args": [{ "property": "id" }, "fa7e1920-9107-422d-a3db-c468cbc5d6df"] -} diff --git a/tests/data/json/filter03.json b/tests/data/json/filter03.json deleted file mode 100644 index c013169..0000000 --- a/tests/data/json/filter03.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "<", - "args": [{ "property": "value" }, 10] -} diff --git a/tests/data/json/filter04.json b/tests/data/json/filter04.json deleted file mode 100644 index b51e7d1..0000000 --- a/tests/data/json/filter04.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": ">", - "args": [{ "property": "value" }, 10] -} diff --git a/tests/data/json/filter05.json b/tests/data/json/filter05.json deleted file mode 100644 index 7c60165..0000000 --- a/tests/data/json/filter05.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "<=", - "args": [{ "property": "value" }, 10] -} diff --git a/tests/data/json/filter06.json b/tests/data/json/filter06.json deleted file mode 100644 index eb1084a..0000000 --- a/tests/data/json/filter06.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": ">=", - "args": [{ "property": "value" }, 10] -} diff --git a/tests/data/json/filter07.json b/tests/data/json/filter07.json deleted file mode 100644 index c33ebe8..0000000 --- a/tests/data/json/filter07.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "like", - "args": [{ "property": "name" }, "foo%"] -} diff --git a/tests/data/json/filter08.json b/tests/data/json/filter08.json deleted file mode 100644 index 22958da..0000000 --- a/tests/data/json/filter08.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "not", - "args": [ - { - "op": "like", - "args": [{ "property": "name" }, "foo%"] - } - ] -} diff --git a/tests/data/json/filter09.json b/tests/data/json/filter09.json deleted file mode 100644 index 7a67d62..0000000 --- a/tests/data/json/filter09.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "between", - "args": [{ "property": "value" }, 10, 20] -} diff --git a/tests/data/json/filter10.json b/tests/data/json/filter10.json deleted file mode 100644 index 57d4590..0000000 --- a/tests/data/json/filter10.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "not", - "args": [ - { - "op": "between", - "args": [{ "property": "value" }, 10, 20] - } - ] -} diff --git a/tests/data/json/filter11.json b/tests/data/json/filter11.json deleted file mode 100644 index 2650d76..0000000 --- a/tests/data/json/filter11.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "in", - "args": [{ "property": "value" }, [1.0, 2.0, 3.0]] -} diff --git a/tests/data/json/filter12.json b/tests/data/json/filter12.json deleted file mode 100644 index 3b92fd8..0000000 --- a/tests/data/json/filter12.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "not", - "args": [ - { - "op": "in", - "args": [{ "property": "value" }, ["a", "b", "c"]] - } - ] -} diff --git a/tests/data/json/filter13.json b/tests/data/json/filter13.json deleted file mode 100644 index 8c93015..0000000 --- a/tests/data/json/filter13.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "isNull", - "args": [{ "property": "value" }] -} diff --git a/tests/data/json/filter16.json b/tests/data/json/filter16.json deleted file mode 100644 index 2c493db..0000000 --- a/tests/data/json/filter16.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "op": "or", - "args": [ - { - "op": "isNull", - "args": [{ "property": "value" }] - }, - { - "op": "between", - "args": [{ "property": "value" }, 10, 20] - } - ] -} diff --git a/tests/data/json/filter18.json b/tests/data/json/filter18.json deleted file mode 100644 index f600d16..0000000 --- a/tests/data/json/filter18.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "op": "s_equals", - "args": [ - { - "type": "Polygon", - "coordinates": [ - [ - [-0.333333, 89.0], - [-102.723546, -0.5], - [-179.0, -89.0], - [-1.9, 89.0], - [-0.0, 89.0], - [2.00001, -1.9], - [-0.333333, 89.0] - ] - ] - }, - { "property": "geometry" } - ] -} diff --git a/tests/data/json/filter19.json b/tests/data/json/filter19.json deleted file mode 100644 index a6e0e06..0000000 --- a/tests/data/json/filter19.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "op": "s_disjoint", - "args": [ - { "property": "geometry" }, - { - "type": "MultiPolygon", - "coordinates": [ - [ - [ - [144.022387, 45.176126], - [-1.1, 0.0], - [180.0, 47.808086], - [144.022387, 45.176126] - ] - ] - ] - } - ] -} diff --git a/tests/data/json/filter20.json b/tests/data/json/filter20.json deleted file mode 100644 index 94349be..0000000 --- a/tests/data/json/filter20.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "op": "s_touches", - "args": [ - { "property": "geometry" }, - { - "type": "MultiLineString", - "coordinates": [ - [ - [-1.9, -0.99999], - [75.292574, 1.5], - [-0.5, -4.016458], - [-31.708594, -74.743801], - [179.0, -90.0] - ], - [ - [-1.9, -1.1], - [1.5, 8.547371] - ] - ] - } - ] -} diff --git a/tests/data/json/filter21.json b/tests/data/json/filter21.json deleted file mode 100644 index 631aee8..0000000 --- a/tests/data/json/filter21.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "op": "s_within", - "args": [ - { - "type": "Polygon", - "coordinates": [ - [ - [-49.88024, 0.5, -75993.341684], - [-1.5, -0.99999, -100000.0], - [0.0, 0.5, -0.333333], - [-49.88024, 0.5, -75993.341684] - ], - [ - [-65.887123, 2.00001, -100000.0], - [0.333333, -53.017711, -79471.332949], - [180.0, 0.0, 1852.616704], - [-65.887123, 2.00001, -100000.0] - ] - ] - }, - { "property": "geometry" } - ] -} diff --git a/tests/data/json/filter23.json b/tests/data/json/filter23.json deleted file mode 100644 index 38b7a86..0000000 --- a/tests/data/json/filter23.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "op": "s_crosses", - "args": [ - { "property": "geometry" }, - { - "type": "LineString", - "coordinates": [ - [172.03086, 1.5], - [1.1, -90.0], - [-159.757695, 0.99999], - [-180.0, 0.5], - [-12.111235, 81.336403], - [-0.5, 64.43958], - [0.0, 81.991815], - [-155.93831, 90.0] - ] - } - ] -} diff --git a/tests/data/json/filter25.json b/tests/data/json/filter25.json deleted file mode 100644 index 6f5c790..0000000 --- a/tests/data/json/filter25.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "t_after", - "args": [{ "property": "updated_at" }, { "date": "2010-02-10" }] -} diff --git a/tests/data/json/filter27.json b/tests/data/json/filter27.json deleted file mode 100644 index 163b7a6..0000000 --- a/tests/data/json/filter27.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "t_contains", - "args": [ - { - "interval": ["2000-01-01T00:00:00Z", "2005-01-10T01:01:01.393216Z"] - }, - { "property": "updated_at" } - ] -} diff --git a/tests/data/json/filter28.json b/tests/data/json/filter28.json deleted file mode 100644 index 2f93734..0000000 --- a/tests/data/json/filter28.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "op": "t_disjoint", - "args": [ - { "interval": ["..", "2005-01-10T01:01:01.393216Z"] }, - { "property": "coverage_date" } - ] -} diff --git a/tests/data/json/filter29.json b/tests/data/json/filter29.json deleted file mode 100644 index 5eb0ab1..0000000 --- a/tests/data/json/filter29.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "t_during", - "args": [ - { - "interval": [{ "property": "created_at" }, { "property": "updated_at" }] - }, - { "interval": ["2005-01-10", "2010-02-10"] } - ] -} diff --git a/tests/data/json/filter30.json b/tests/data/json/filter30.json deleted file mode 100644 index fca5ed8..0000000 --- a/tests/data/json/filter30.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "t_equals", - "args": [{ "property": "updated_at" }, { "date": "1851-04-29" }] -} diff --git a/tests/data/json/filter31.json b/tests/data/json/filter31.json deleted file mode 100644 index c348332..0000000 --- a/tests/data/json/filter31.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "t_finishedBy", - "args": [ - { "property": "coverage_date" }, - { - "interval": ["1991-10-07T08:21:06.393262Z", "2010-02-10T05:29:20.073225Z"] - } - ] -} diff --git a/tests/data/json/filter32.json b/tests/data/json/filter32.json deleted file mode 100644 index 7684d5f..0000000 --- a/tests/data/json/filter32.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "t_finishes", - "args": [ - { "property": "coverage_dates" }, - { - "interval": ["1991-10-07", "2010-02-10T05:29:20.073225Z"] - } - ] -} diff --git a/tests/data/json/filter33.json b/tests/data/json/filter33.json deleted file mode 100644 index 491259a..0000000 --- a/tests/data/json/filter33.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "t_intersects", - "args": [ - { "property": "coverage_date" }, - { - "interval": ["1991-10-07T08:21:06.393262Z", "2010-02-10T05:29:20.073225Z"] - } - ] -} diff --git a/tests/data/json/filter34.json b/tests/data/json/filter34.json deleted file mode 100644 index 3cf237d..0000000 --- a/tests/data/json/filter34.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "op": "t_meets", - "args": [ - { "interval": ["2005-01-10", "2010-02-10"] }, - { "property": "coverage_dates" } - ] -} diff --git a/tests/data/json/filter35.json b/tests/data/json/filter35.json deleted file mode 100644 index 244531e..0000000 --- a/tests/data/json/filter35.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "t_metBy", - "args": [ - { - "interval": ["2010-02-10T05:29:20.073225Z", "2010-10-07"] - }, - { "property": "coverage_dates" } - ] -} diff --git a/tests/data/json/filter36.json b/tests/data/json/filter36.json deleted file mode 100644 index dff8485..0000000 --- a/tests/data/json/filter36.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "t_overlappedBy", - "args": [ - { - "interval": ["1991-10-07T08:21:06.393262Z", "2010-02-10T05:29:20.073225Z"] - }, - { "property": "coverage_dates" } - ] -} diff --git a/tests/data/json/filter37.json b/tests/data/json/filter37.json deleted file mode 100644 index 645e88f..0000000 --- a/tests/data/json/filter37.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "t_overlaps", - "args": [ - { "property": "coverage_date" }, - { - "interval": ["1991-10-07T08:21:06.393262Z", "1992-10-09T08:08:08.393473Z"] - } - ] -} diff --git a/tests/data/json/filter38.json b/tests/data/json/filter38.json deleted file mode 100644 index d4f6a0b..0000000 --- a/tests/data/json/filter38.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "op": "t_startedBy", - "args": [ - { - "interval": ["1991-10-07T08:21:06.393262Z", "2010-02-10T05:29:20.073225Z"] - }, - { "property": "coverage_dates" } - ] -} diff --git a/tests/data/json/filter39.json b/tests/data/json/filter39.json deleted file mode 100644 index b7ba657..0000000 --- a/tests/data/json/filter39.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "op": "t_starts", - "args": [ - { "property": "coverage_dates" }, - { "interval": ["1991-10-07T08:21:06.393262Z", ".."] } - ] -} diff --git a/tests/data/json/filter42.json b/tests/data/json/filter42.json deleted file mode 100644 index 45f8733..0000000 --- a/tests/data/json/filter42.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "op": "=", - "args": [ - { "op": "accenti", "args": [{ "property": "owner" }] }, - { "op": "accenti", "args": ["Beyoncé"] } - ] -} diff --git a/tests/data/json/filter43.json b/tests/data/json/filter43.json deleted file mode 100644 index 1a4ba2a..0000000 --- a/tests/data/json/filter43.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "op": "=", - "args": [ - { "op": "casei", "args": [{ "property": "owner" }] }, - { "op": "casei", "args": ["somebody else"] } - ] -} diff --git a/tests/data/json/filter51.json b/tests/data/json/filter51.json deleted file mode 100644 index 52a88ab..0000000 --- a/tests/data/json/filter51.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "a_containedBy", - "args": [{ "property": "values" }, ["a", "b", "c"]] -} diff --git a/tests/data/json/filter52.json b/tests/data/json/filter52.json deleted file mode 100644 index 22f2648..0000000 --- a/tests/data/json/filter52.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "a_contains", - "args": [{ "property": "values" }, ["a", "b", "c"]] -} diff --git a/tests/data/json/filter53.json b/tests/data/json/filter53.json deleted file mode 100644 index d86bb8b..0000000 --- a/tests/data/json/filter53.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "a_equals", - "args": [["a", true, 1.0, 8], { "property": "values" }] -} diff --git a/tests/data/json/filter54.json b/tests/data/json/filter54.json deleted file mode 100644 index 584e7ae..0000000 --- a/tests/data/json/filter54.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "op": "a_overlaps", - "args": [ - { "property": "values" }, - [{ "timestamp": "2012-08-10T05:30:00Z" }, { "date": "2010-02-10" }, false] - ] -} diff --git a/tests/data/json/filter55.json b/tests/data/json/filter55.json deleted file mode 100644 index 796ecd1..0000000 --- a/tests/data/json/filter55.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "op": "s_equals", - "args": [ - { - "type": "MultiPoint", - "coordinates": [ - [180.0, -0.5], - [179.0, -47.121701], - [180.0, -0.0], - [33.470475, -0.99999], - [179.0, -15.333062] - ] - }, - { "property": "geometry" } - ] -} diff --git a/tests/data/json/filter56.json b/tests/data/json/filter56.json deleted file mode 100644 index ce33121..0000000 --- a/tests/data/json/filter56.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "op": "s_equals", - "args": [ - { - "type": "GeometryCollection", - "geometries": [ - { - "type": "Point", - "coordinates": [1.9, 2.00001] - }, - { - "type": "Point", - "coordinates": [0.0, -2.00001] - }, - { - "type": "MultiLineString", - "coordinates": [ - [ - [-2.00001, -0.0], - [-77.292642, -0.5], - [-87.515626, -0.0], - [-180.0, 12.502773], - [21.204842, -1.5], - [-21.878857, -90.0] - ] - ] - }, - { - "type": "Point", - "coordinates": [1.9, 0.5] - }, - { - "type": "LineString", - "coordinates": [ - [179.0, 1.179148], - [-148.192487, -65.007816], - [0.5, 0.333333] - ] - } - ] - }, - { "property": "geometry" } - ] -} diff --git a/tests/data/json/filter58.json b/tests/data/json/filter58.json deleted file mode 100644 index 6915bd8..0000000 --- a/tests/data/json/filter58.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "like", - "args": [{ "property": "name" }, { "op": "casei", "args": ["FOO%"] }] -} diff --git a/tests/data/json/filter59.json b/tests/data/json/filter59.json deleted file mode 100644 index aebd58f..0000000 --- a/tests/data/json/filter59.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "op": "=", - "args": [ - { "property": "owner" }, - { - "op": "casei", - "args": [{ "op": "accenti", "args": ["Beyoncé"] }] - } - ] -} diff --git a/tests/data/json/filter60.json b/tests/data/json/filter60.json deleted file mode 100644 index 6d19de3..0000000 --- a/tests/data/json/filter60.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "op": "=", - "args": [{ "property": "name" }, "King's Landing"] -} diff --git a/tests/data/json/filter61.json b/tests/data/json/filter61.json deleted file mode 100644 index 033d644..0000000 --- a/tests/data/json/filter61.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "op": "or", - "args": [ - { - "op": "not", - "args": [{ "op": ">", "args": [{ "property": "value" }, 10] }] - }, - { "op": "=", "args": [{ "property": "foo" }, 2] } - ] -} diff --git a/tests/data/text/clause6_01.txt b/tests/data/text/clause6_01.txt new file mode 100644 index 0000000..577262d --- /dev/null +++ b/tests/data/text/clause6_01.txt @@ -0,0 +1 @@ +avg(windSpeed) diff --git a/tests/data/text/clause6_02a.txt b/tests/data/text/clause6_02a.txt new file mode 100644 index 0000000..3b86282 --- /dev/null +++ b/tests/data/text/clause6_02a.txt @@ -0,0 +1 @@ +city='Toronto' diff --git a/tests/data/text/clause6_02b.txt b/tests/data/text/clause6_02b.txt new file mode 100644 index 0000000..c34a50e --- /dev/null +++ b/tests/data/text/clause6_02b.txt @@ -0,0 +1 @@ +avg(windSpeed) < 4 diff --git a/tests/data/text/clause6_02c.txt b/tests/data/text/clause6_02c.txt new file mode 100644 index 0000000..098dc74 --- /dev/null +++ b/tests/data/text/clause6_02c.txt @@ -0,0 +1 @@ +balance-150.0 > 0 diff --git a/tests/data/text/clause6_02d.txt b/tests/data/text/clause6_02d.txt new file mode 100644 index 0000000..2a260c4 --- /dev/null +++ b/tests/data/text/clause6_02d.txt @@ -0,0 +1 @@ +updated >= date('1970-01-01') diff --git a/tests/data/text/clause6_03.txt b/tests/data/text/clause6_03.txt new file mode 100644 index 0000000..51b07cb --- /dev/null +++ b/tests/data/text/clause6_03.txt @@ -0,0 +1 @@ +geometry IS NOT NULL diff --git a/tests/data/text/clause7_01.txt b/tests/data/text/clause7_01.txt new file mode 100644 index 0000000..e3d6a6b --- /dev/null +++ b/tests/data/text/clause7_01.txt @@ -0,0 +1 @@ +name LIKE 'Smith%' diff --git a/tests/data/text/clause7_02.txt b/tests/data/text/clause7_02.txt new file mode 100644 index 0000000..c8d2232 --- /dev/null +++ b/tests/data/text/clause7_02.txt @@ -0,0 +1 @@ +depth BETWEEN 100.0 and 150.0 diff --git a/tests/data/text/clause7_03a.txt b/tests/data/text/clause7_03a.txt new file mode 100644 index 0000000..8d7bd10 --- /dev/null +++ b/tests/data/text/clause7_03a.txt @@ -0,0 +1 @@ +cityName IN ('Toronto','Frankfurt','Tokyo','New York') diff --git a/tests/data/text/clause7_03b.txt b/tests/data/text/clause7_03b.txt new file mode 100644 index 0000000..365e1a1 --- /dev/null +++ b/tests/data/text/clause7_03b.txt @@ -0,0 +1 @@ +category NOT IN (1,2,3,4) diff --git a/tests/data/text/clause7_04.txt b/tests/data/text/clause7_04.txt new file mode 100644 index 0000000..963265b --- /dev/null +++ b/tests/data/text/clause7_04.txt @@ -0,0 +1 @@ +CASEI(road_class) IN (CASEI('Οδος'),CASEI('Straße')) diff --git a/tests/data/text/clause7_05.txt b/tests/data/text/clause7_05.txt new file mode 100644 index 0000000..1adbb34 --- /dev/null +++ b/tests/data/text/clause7_05.txt @@ -0,0 +1 @@ +ACCENTI(etat_vol) = ACCENTI('débárquér') diff --git a/tests/data/text/clause7_07.txt b/tests/data/text/clause7_07.txt new file mode 100644 index 0000000..60cbc74 --- /dev/null +++ b/tests/data/text/clause7_07.txt @@ -0,0 +1 @@ +S_INTERSECTS(geometry,POINT(36.319836 32.288087)) diff --git a/tests/data/text/clause7_10.txt b/tests/data/text/clause7_10.txt new file mode 100644 index 0000000..2556f8a --- /dev/null +++ b/tests/data/text/clause7_10.txt @@ -0,0 +1,6 @@ +S_CROSSES(road,POLYGON((43.7286 -79.2986, 43.7311 -79.2996, 43.7323 -79.2972, + 43.7326 -79.2971, 43.7350 -79.2981, 43.7350 -79.2982, + 43.7352 -79.2982, 43.7357 -79.2956, 43.7337 -79.2948, + 43.7343 -79.2933, 43.7339 -79.2923, 43.7327 -79.2947, + 43.7320 -79.2942, 43.7322 -79.2937, 43.7306 -79.2930, + 43.7303 -79.2930, 43.7299 -79.2928, 43.7286 -79.2986))) diff --git a/tests/data/text/clause7_12.txt b/tests/data/text/clause7_12.txt new file mode 100644 index 0000000..c538da4 --- /dev/null +++ b/tests/data/text/clause7_12.txt @@ -0,0 +1 @@ +T_INTERSECTS(event_time, INTERVAL('1969-07-16T05:32:00Z', '1969-07-24T16:50:35Z')) diff --git a/tests/data/text/clause7_13.txt b/tests/data/text/clause7_13.txt new file mode 100644 index 0000000..2ecaeac --- /dev/null +++ b/tests/data/text/clause7_13.txt @@ -0,0 +1 @@ +T_DURING(INTERVAL(touchdown, liftOff), INTERVAL('1969-07-16T13:32:00Z', '1969-07-24T16:50:35Z')) diff --git a/tests/data/text/clause7_15.txt b/tests/data/text/clause7_15.txt new file mode 100644 index 0000000..cedc0f9 --- /dev/null +++ b/tests/data/text/clause7_15.txt @@ -0,0 +1 @@ +A_CONTAINS(layer:ids, ('layers-ca','layers-us')) diff --git a/tests/data/text/clause7_16.txt b/tests/data/text/clause7_16.txt new file mode 100644 index 0000000..5746c34 --- /dev/null +++ b/tests/data/text/clause7_16.txt @@ -0,0 +1,8 @@ +S_CROSSES(LINESTRING(43.72992 -79.2998, 43.73005 -79.2991, 43.73006 -79.2984, + 43.73140 -79.2956, 43.73259 -79.2950, 43.73266 -79.2945, + 43.73320 -79.2936, 43.73378 -79.2936, 43.73486 -79.2917), + POLYGON((43.7286 -79.2986, 43.7311 -79.2996, 43.7323 -79.2972, 43.7326 -79.2971, + 43.7350 -79.2981, 43.7350 -79.2982, 43.7352 -79.2982, 43.7357 -79.2956, + 43.7337 -79.2948, 43.7343 -79.2933, 43.7339 -79.2923, 43.7327 -79.2947, + 43.7320 -79.2942, 43.7322 -79.2937, 43.7306 -79.2930, 43.7303 -79.2930, + 43.7299 -79.2928, 43.7286 -79.2986))) diff --git a/tests/data/text/clause7_17.txt b/tests/data/text/clause7_17.txt new file mode 100644 index 0000000..6735cae --- /dev/null +++ b/tests/data/text/clause7_17.txt @@ -0,0 +1 @@ +T_DURING(INTERVAL('1969-07-20T20:17:40Z', '1969-07-21T17:54:00Z'), INTERVAL('1969-07-16T13:32:00Z', '1969-07-24T16:50:35Z')) diff --git a/tests/data/text/clause7_18.txt b/tests/data/text/clause7_18.txt new file mode 100644 index 0000000..030938c --- /dev/null +++ b/tests/data/text/clause7_18.txt @@ -0,0 +1 @@ +S_WITHIN(road,Buffer(geometry,10,'m')) diff --git a/tests/data/text/clause7_19.txt b/tests/data/text/clause7_19.txt new file mode 100644 index 0000000..9ff1c15 --- /dev/null +++ b/tests/data/text/clause7_19.txt @@ -0,0 +1 @@ +vehicle_height > (bridge_clearance-1) diff --git a/tests/data/text/example01.txt b/tests/data/text/example01.txt new file mode 100644 index 0000000..8a9ac29 --- /dev/null +++ b/tests/data/text/example01.txt @@ -0,0 +1 @@ +landsat:scene_id = 'LC82030282019133LGN00' diff --git a/tests/data/text/example02.txt b/tests/data/text/example02.txt new file mode 100644 index 0000000..893a60e --- /dev/null +++ b/tests/data/text/example02.txt @@ -0,0 +1 @@ +eo:instrument LIKE 'OLI%' diff --git a/tests/data/text/example03.txt b/tests/data/text/example03.txt new file mode 100644 index 0000000..1dd68ec --- /dev/null +++ b/tests/data/text/example03.txt @@ -0,0 +1 @@ +landsat:wrs_path IN ('153','154','15X') diff --git a/tests/data/text/example04.txt b/tests/data/text/example04.txt new file mode 100644 index 0000000..3b93699 --- /dev/null +++ b/tests/data/text/example04.txt @@ -0,0 +1 @@ +eo:cloud_cover < 0.1 AND landsat:wrs_row=28 AND landsat:wrs_path=203 diff --git a/tests/data/text/example05a.txt b/tests/data/text/example05a.txt new file mode 100644 index 0000000..7dc8b6b --- /dev/null +++ b/tests/data/text/example05a.txt @@ -0,0 +1 @@ +eo:cloud_cover=0.1 OR eo:cloud_cover=0.2 diff --git a/tests/data/text/example05b.txt b/tests/data/text/example05b.txt new file mode 100644 index 0000000..e3e882d --- /dev/null +++ b/tests/data/text/example05b.txt @@ -0,0 +1 @@ +eo:cloud_cover IN (0.1,0.2) diff --git a/tests/data/text/example06a.txt b/tests/data/text/example06a.txt new file mode 100644 index 0000000..fbcb75a --- /dev/null +++ b/tests/data/text/example06a.txt @@ -0,0 +1,3 @@ + eo:cloud_cover BETWEEN 0.1 AND 0.2 +AND landsat:wrs_row=28 +AND landsat:wrs_path=203 diff --git a/tests/data/text/example06b.txt b/tests/data/text/example06b.txt new file mode 100644 index 0000000..774e365 --- /dev/null +++ b/tests/data/text/example06b.txt @@ -0,0 +1,4 @@ + eo:cloud_cover >= 0.1 +AND eo:cloud_cover <= 0.2 +AND landsat:wrs_row=28 +AND landsat:wrs_path=203 diff --git a/tests/data/text/example07.txt b/tests/data/text/example07.txt new file mode 100644 index 0000000..562a7aa --- /dev/null +++ b/tests/data/text/example07.txt @@ -0,0 +1,12 @@ +eo:instrument LIKE 'OLI%' + AND S_INTERSECTS(footprint,POLYGON((43.5845 -79.5442, + 43.6079 -79.4893, + 43.5677 -79.4632, + 43.6129 -79.3925, + 43.6223 -79.3238, + 43.6576 -79.3163, + 43.7945 -79.1178, + 43.8144 -79.1542, + 43.8555 -79.1714, + 43.7509 -79.6390, + 43.5845 -79.5442))) diff --git a/tests/data/text/example08.txt b/tests/data/text/example08.txt new file mode 100644 index 0000000..64190f8 --- /dev/null +++ b/tests/data/text/example08.txt @@ -0,0 +1,11 @@ + beamMode='ScanSAR Narrow' +AND swathDirection='ascending' +AND polarization='HH+VV+HV+VH' +AND s_intersects(footprint,POLYGON((-77.117938 38.936860, + -77.040604 39.995648, + -76.910536 38.892912, + -77.039359 38.791753, + -77.047906 38.841462, + -77.034183 38.840655, + -77.033142 38.857490, + -77.117938 38.936860))) diff --git a/tests/data/text/example09.txt b/tests/data/text/example09.txt new file mode 100644 index 0000000..ccd580b --- /dev/null +++ b/tests/data/text/example09.txt @@ -0,0 +1 @@ +floors>5 diff --git a/tests/data/text/example10.txt b/tests/data/text/example10.txt new file mode 100644 index 0000000..f84b9d6 --- /dev/null +++ b/tests/data/text/example10.txt @@ -0,0 +1 @@ +taxes <= 500 diff --git a/tests/data/text/example11.txt b/tests/data/text/example11.txt new file mode 100644 index 0000000..7f7c8b8 --- /dev/null +++ b/tests/data/text/example11.txt @@ -0,0 +1 @@ +owner LIKE '%Jones%' diff --git a/tests/data/text/example12.txt b/tests/data/text/example12.txt new file mode 100644 index 0000000..630d910 --- /dev/null +++ b/tests/data/text/example12.txt @@ -0,0 +1 @@ +owner LIKE 'Mike%' diff --git a/tests/data/text/example13.txt b/tests/data/text/example13.txt new file mode 100644 index 0000000..6324fe9 --- /dev/null +++ b/tests/data/text/example13.txt @@ -0,0 +1 @@ +owner NOT LIKE '%Mike%' diff --git a/tests/data/text/example14.txt b/tests/data/text/example14.txt new file mode 100644 index 0000000..5d3993e --- /dev/null +++ b/tests/data/text/example14.txt @@ -0,0 +1 @@ +swimming_pool = true diff --git a/tests/data/text/example15.txt b/tests/data/text/example15.txt new file mode 100644 index 0000000..58b6ff2 --- /dev/null +++ b/tests/data/text/example15.txt @@ -0,0 +1 @@ +floors>5 AND swimming_pool=true diff --git a/tests/data/text/example16.txt b/tests/data/text/example16.txt new file mode 100644 index 0000000..5f91ac6 --- /dev/null +++ b/tests/data/text/example16.txt @@ -0,0 +1,3 @@ +swimming_pool=true AND (floors>5 + OR material LIKE 'brick%' + OR material LIKE '%brick') diff --git a/tests/data/text/example17.txt b/tests/data/text/example17.txt new file mode 100644 index 0000000..01f11c1 --- /dev/null +++ b/tests/data/text/example17.txt @@ -0,0 +1 @@ +(floors>5 AND material='brick') OR swimming_pool=true diff --git a/tests/data/text/example18.txt b/tests/data/text/example18.txt new file mode 100644 index 0000000..bb03b1c --- /dev/null +++ b/tests/data/text/example18.txt @@ -0,0 +1 @@ +NOT (floors<5) OR swimming_pool=true diff --git a/tests/data/text/example19.txt b/tests/data/text/example19.txt new file mode 100644 index 0000000..e1466c5 --- /dev/null +++ b/tests/data/text/example19.txt @@ -0,0 +1 @@ +(owner LIKE 'mike%' OR owner LIKE 'Mike%') AND floors<4 diff --git a/tests/data/text/example20.txt b/tests/data/text/example20.txt new file mode 100644 index 0000000..8fb95ee --- /dev/null +++ b/tests/data/text/example20.txt @@ -0,0 +1 @@ +T_BEFORE(built, DATE('2015-01-01')) diff --git a/tests/data/text/example21.txt b/tests/data/text/example21.txt new file mode 100644 index 0000000..19bbe55 --- /dev/null +++ b/tests/data/text/example21.txt @@ -0,0 +1 @@ +T_AFTER(built,DATE('2012-06-05')) diff --git a/tests/data/text/example22.txt b/tests/data/text/example22.txt new file mode 100644 index 0000000..2d0baa6 --- /dev/null +++ b/tests/data/text/example22.txt @@ -0,0 +1 @@ +T_DURING(INTERVAL(starts_at, ends_at), INTERVAL('2017-06-10T07:30:00Z', '2017-06-11T10:30:00Z')) diff --git a/tests/data/text/example23.txt b/tests/data/text/example23.txt new file mode 100644 index 0000000..6b17270 --- /dev/null +++ b/tests/data/text/example23.txt @@ -0,0 +1 @@ +S_WITHIN(location,BBOX(-118,33.8,-117.9,34)) diff --git a/tests/data/text/example24.txt b/tests/data/text/example24.txt new file mode 100644 index 0000000..4e4db3f --- /dev/null +++ b/tests/data/text/example24.txt @@ -0,0 +1 @@ +S_INTERSECTS(geometry,POLYGON((-10.0 -10.0,10.0 -10.0,10.0 10.0,-10.0 -10.0))) diff --git a/tests/data/text/example25.txt b/tests/data/text/example25.txt new file mode 100644 index 0000000..e022e47 --- /dev/null +++ b/tests/data/text/example25.txt @@ -0,0 +1 @@ +floors>5 AND S_WITHIN(geometry,BBOX(-118,33.8,-117.9,34)) diff --git a/tests/data/text/example26.txt b/tests/data/text/example26.txt new file mode 100644 index 0000000..963265b --- /dev/null +++ b/tests/data/text/example26.txt @@ -0,0 +1 @@ +CASEI(road_class) IN (CASEI('Οδος'),CASEI('Straße')) diff --git a/tests/data/text/example27.txt b/tests/data/text/example27.txt new file mode 100644 index 0000000..1adbb34 --- /dev/null +++ b/tests/data/text/example27.txt @@ -0,0 +1 @@ +ACCENTI(etat_vol) = ACCENTI('débárquér') diff --git a/tests/data/text/example28.txt b/tests/data/text/example28.txt new file mode 100644 index 0000000..a8a674a --- /dev/null +++ b/tests/data/text/example28.txt @@ -0,0 +1 @@ +CASEI(geophys:SURVEY_NAME) LIKE CASEI('%calcutta%') diff --git a/tests/data/text/filter01.txt b/tests/data/text/example29.txt similarity index 100% rename from tests/data/text/filter01.txt rename to tests/data/text/example29.txt diff --git a/tests/data/text/filter02.txt b/tests/data/text/example30.txt similarity index 100% rename from tests/data/text/filter02.txt rename to tests/data/text/example30.txt diff --git a/tests/data/text/filter03.txt b/tests/data/text/example31.txt similarity index 100% rename from tests/data/text/filter03.txt rename to tests/data/text/example31.txt diff --git a/tests/data/text/filter04.txt b/tests/data/text/example32.txt similarity index 100% rename from tests/data/text/filter04.txt rename to tests/data/text/example32.txt diff --git a/tests/data/text/filter05.txt b/tests/data/text/example33.txt similarity index 100% rename from tests/data/text/filter05.txt rename to tests/data/text/example33.txt diff --git a/tests/data/text/filter06.txt b/tests/data/text/example34.txt similarity index 100% rename from tests/data/text/filter06.txt rename to tests/data/text/example34.txt diff --git a/tests/data/text/filter07.txt b/tests/data/text/example35.txt similarity index 100% rename from tests/data/text/filter07.txt rename to tests/data/text/example35.txt diff --git a/tests/data/text/filter08-alt01.txt b/tests/data/text/example36-alt01.txt similarity index 100% rename from tests/data/text/filter08-alt01.txt rename to tests/data/text/example36-alt01.txt diff --git a/tests/data/text/filter08.txt b/tests/data/text/example36.txt similarity index 100% rename from tests/data/text/filter08.txt rename to tests/data/text/example36.txt diff --git a/tests/data/text/filter09.txt b/tests/data/text/example37.txt similarity index 100% rename from tests/data/text/filter09.txt rename to tests/data/text/example37.txt diff --git a/tests/data/text/filter10-alt01.txt b/tests/data/text/example38-alt01.txt similarity index 100% rename from tests/data/text/filter10-alt01.txt rename to tests/data/text/example38-alt01.txt diff --git a/tests/data/text/filter10.txt b/tests/data/text/example38.txt similarity index 100% rename from tests/data/text/filter10.txt rename to tests/data/text/example38.txt diff --git a/tests/data/text/filter11.txt b/tests/data/text/example39.txt similarity index 100% rename from tests/data/text/filter11.txt rename to tests/data/text/example39.txt diff --git a/tests/data/text/filter12-alt01.txt b/tests/data/text/example40-alt01.txt similarity index 100% rename from tests/data/text/filter12-alt01.txt rename to tests/data/text/example40-alt01.txt diff --git a/tests/data/text/filter12.txt b/tests/data/text/example40.txt similarity index 100% rename from tests/data/text/filter12.txt rename to tests/data/text/example40.txt diff --git a/tests/data/text/filter13.txt b/tests/data/text/example41.txt similarity index 100% rename from tests/data/text/filter13.txt rename to tests/data/text/example41.txt diff --git a/tests/data/text/filter14-alt01.txt b/tests/data/text/example42-alt01.txt similarity index 100% rename from tests/data/text/filter14-alt01.txt rename to tests/data/text/example42-alt01.txt diff --git a/tests/data/text/filter14.txt b/tests/data/text/example42.txt similarity index 100% rename from tests/data/text/filter14.txt rename to tests/data/text/example42.txt diff --git a/tests/data/text/filter15-alt01.txt b/tests/data/text/example43-alt01.txt similarity index 100% rename from tests/data/text/filter15-alt01.txt rename to tests/data/text/example43-alt01.txt diff --git a/tests/data/text/filter15.txt b/tests/data/text/example43.txt similarity index 100% rename from tests/data/text/filter15.txt rename to tests/data/text/example43.txt diff --git a/tests/data/text/filter16-alt01.txt b/tests/data/text/example44-alt01.txt similarity index 100% rename from tests/data/text/filter16-alt01.txt rename to tests/data/text/example44-alt01.txt diff --git a/tests/data/text/filter16.txt b/tests/data/text/example44.txt similarity index 100% rename from tests/data/text/filter16.txt rename to tests/data/text/example44.txt diff --git a/tests/data/text/filter17.txt b/tests/data/text/example45.txt similarity index 100% rename from tests/data/text/filter17.txt rename to tests/data/text/example45.txt diff --git a/tests/data/text/filter18-alt01.txt b/tests/data/text/example46-alt01.txt similarity index 100% rename from tests/data/text/filter18-alt01.txt rename to tests/data/text/example46-alt01.txt diff --git a/tests/data/text/filter18.txt b/tests/data/text/example46.txt similarity index 100% rename from tests/data/text/filter18.txt rename to tests/data/text/example46.txt diff --git a/tests/data/text/filter19.txt b/tests/data/text/example47.txt similarity index 100% rename from tests/data/text/filter19.txt rename to tests/data/text/example47.txt diff --git a/tests/data/text/example48.txt b/tests/data/text/example48.txt new file mode 100644 index 0000000..fd42af3 --- /dev/null +++ b/tests/data/text/example48.txt @@ -0,0 +1 @@ +S_TOUCHES("geometry", MULTILINESTRING ((-1.9 -0.99999, 75.292574 1.5, -0.5 -4.016458, -31.708594 -74.743801, 179.0 -90.0),(-1.9 -1.1, 1.5 8.547371))) diff --git a/tests/data/text/filter21-alt01.txt b/tests/data/text/example49-alt01.txt similarity index 100% rename from tests/data/text/filter21-alt01.txt rename to tests/data/text/example49-alt01.txt diff --git a/tests/data/text/filter21.txt b/tests/data/text/example49.txt similarity index 100% rename from tests/data/text/filter21.txt rename to tests/data/text/example49.txt diff --git a/tests/data/text/filter22.txt b/tests/data/text/example50.txt similarity index 100% rename from tests/data/text/filter22.txt rename to tests/data/text/example50.txt diff --git a/tests/data/text/filter23.txt b/tests/data/text/example51.txt similarity index 100% rename from tests/data/text/filter23.txt rename to tests/data/text/example51.txt diff --git a/tests/data/text/filter24.txt b/tests/data/text/example52.txt similarity index 100% rename from tests/data/text/filter24.txt rename to tests/data/text/example52.txt diff --git a/tests/data/text/filter25.txt b/tests/data/text/example53.txt similarity index 100% rename from tests/data/text/filter25.txt rename to tests/data/text/example53.txt diff --git a/tests/data/text/filter26-alt01.txt b/tests/data/text/example54-alt01.txt similarity index 100% rename from tests/data/text/filter26-alt01.txt rename to tests/data/text/example54-alt01.txt diff --git a/tests/data/text/filter26.txt b/tests/data/text/example54.txt similarity index 100% rename from tests/data/text/filter26.txt rename to tests/data/text/example54.txt diff --git a/tests/data/text/filter27-alt01.txt b/tests/data/text/example55-alt01.txt similarity index 60% rename from tests/data/text/filter27-alt01.txt rename to tests/data/text/example55-alt01.txt index 0aefebb..0a718ac 100644 --- a/tests/data/text/filter27-alt01.txt +++ b/tests/data/text/example55-alt01.txt @@ -1 +1 @@ -T_CONTAINS(INTERVAL('2000-01-01T00:00:00Z', '2005-01-10T01:01:01.393216Z'), "updated_at") +T_CONTAINS(INTERVAL('2000-01-01T00:00:00Z', '2005-01-10T01:01:01.393216Z'), INTERVAL(starts_at, ends_at)) diff --git a/tests/data/text/filter27.txt b/tests/data/text/example55.txt similarity index 56% rename from tests/data/text/filter27.txt rename to tests/data/text/example55.txt index aeafb45..02d5d07 100644 --- a/tests/data/text/filter27.txt +++ b/tests/data/text/example55.txt @@ -1 +1 @@ -T_CONTAINS(INTERVAL('2000-01-01T00:00:00.000000Z', '2005-01-10T01:01:01.393216Z'), "updated_at") +T_CONTAINS(INTERVAL('2000-01-01T00:00:00.000000Z', '2005-01-10T01:01:01.393216Z'), INTERVAL(starts_at, ends_at)) diff --git a/tests/data/text/example56.txt b/tests/data/text/example56.txt new file mode 100644 index 0000000..1cb7ab7 --- /dev/null +++ b/tests/data/text/example56.txt @@ -0,0 +1 @@ +T_DISJOINT(INTERVAL('..', '2005-01-10T01:01:01.393216Z'), INTERVAL(starts_at, ends_at)) diff --git a/tests/data/text/example57.txt b/tests/data/text/example57.txt new file mode 100644 index 0000000..fc63997 --- /dev/null +++ b/tests/data/text/example57.txt @@ -0,0 +1 @@ +T_DURING(INTERVAL(starts_at, ends_at), INTERVAL('2005-01-10', '2010-02-10')) diff --git a/tests/data/text/filter30.txt b/tests/data/text/example58.txt similarity index 100% rename from tests/data/text/filter30.txt rename to tests/data/text/example58.txt diff --git a/tests/data/text/example59.txt b/tests/data/text/example59.txt new file mode 100644 index 0000000..6f35c1c --- /dev/null +++ b/tests/data/text/example59.txt @@ -0,0 +1 @@ +T_FINISHEDBY(INTERVAL(starts_at, ends_at), INTERVAL('1991-10-07T08:21:06.393262Z', '2010-02-10T05:29:20.073225Z')) diff --git a/tests/data/text/example60.txt b/tests/data/text/example60.txt new file mode 100644 index 0000000..8211ddd --- /dev/null +++ b/tests/data/text/example60.txt @@ -0,0 +1 @@ +T_FINISHES(INTERVAL(starts_at, ends_at), INTERVAL('1991-10-07', '2010-02-10T05:29:20.073225Z')) diff --git a/tests/data/text/example61.txt b/tests/data/text/example61.txt new file mode 100644 index 0000000..4b23605 --- /dev/null +++ b/tests/data/text/example61.txt @@ -0,0 +1 @@ +T_INTERSECTS(INTERVAL(starts_at, ends_at), INTERVAL('1991-10-07T08:21:06.393262Z', '2010-02-10T05:29:20.073225Z')) diff --git a/tests/data/text/example62.txt b/tests/data/text/example62.txt new file mode 100644 index 0000000..0357ed0 --- /dev/null +++ b/tests/data/text/example62.txt @@ -0,0 +1 @@ +T_MEETS(INTERVAL('2005-01-10', '2010-02-10'), INTERVAL(starts_at, ends_at)) diff --git a/tests/data/text/example63.txt b/tests/data/text/example63.txt new file mode 100644 index 0000000..6b6497d --- /dev/null +++ b/tests/data/text/example63.txt @@ -0,0 +1 @@ +T_METBY(INTERVAL('2010-02-10T05:29:20.073225Z', '2010-10-07'), INTERVAL(starts_at, ends_at)) diff --git a/tests/data/text/filter36.txt b/tests/data/text/example64.txt similarity index 54% rename from tests/data/text/filter36.txt rename to tests/data/text/example64.txt index d08d690..be70e30 100644 --- a/tests/data/text/filter36.txt +++ b/tests/data/text/example64.txt @@ -1 +1 @@ -T_OVERLAPPEDBY(INTERVAL('1991-10-07T08:21:06.393262Z', '2010-02-10T05:29:20.073225Z'), "coverage_dates") +T_OVERLAPPEDBY(INTERVAL('1991-10-07T08:21:06.393262Z', '2010-02-10T05:29:20.073225Z'), INTERVAL(starts_at, ends_at)) diff --git a/tests/data/text/example65.txt b/tests/data/text/example65.txt new file mode 100644 index 0000000..e95c22f --- /dev/null +++ b/tests/data/text/example65.txt @@ -0,0 +1 @@ +T_OVERLAPS(INTERVAL(starts_at, ends_at), INTERVAL('1991-10-07T08:21:06.393262Z', '1992-10-09T08:08:08.393473Z')) diff --git a/tests/data/text/filter38.txt b/tests/data/text/example66.txt similarity index 56% rename from tests/data/text/filter38.txt rename to tests/data/text/example66.txt index f4ad0fc..8a16d08 100644 --- a/tests/data/text/filter38.txt +++ b/tests/data/text/example66.txt @@ -1 +1 @@ -T_STARTEDBY(INTERVAL('1991-10-07T08:21:06.393262Z', '2010-02-10T05:29:20.073225Z'), "coverage_dates") +T_STARTEDBY(INTERVAL('1991-10-07T08:21:06.393262Z', '2010-02-10T05:29:20.073225Z'), INTERVAL(starts_at, ends_at)) diff --git a/tests/data/text/example67.txt b/tests/data/text/example67.txt new file mode 100644 index 0000000..1f661f4 --- /dev/null +++ b/tests/data/text/example67.txt @@ -0,0 +1 @@ +T_STARTS(INTERVAL(starts_at, ends_at), INTERVAL('1991-10-07T08:21:06.393262Z', '..')) diff --git a/tests/data/text/filter40.txt b/tests/data/text/example68.txt similarity index 100% rename from tests/data/text/filter40.txt rename to tests/data/text/example68.txt diff --git a/tests/data/text/filter41.txt b/tests/data/text/example69.txt similarity index 100% rename from tests/data/text/filter41.txt rename to tests/data/text/example69.txt diff --git a/tests/data/text/filter42.txt b/tests/data/text/example70.txt similarity index 100% rename from tests/data/text/filter42.txt rename to tests/data/text/example70.txt diff --git a/tests/data/text/filter43.txt b/tests/data/text/example71.txt similarity index 100% rename from tests/data/text/filter43.txt rename to tests/data/text/example71.txt diff --git a/tests/data/text/filter44.txt b/tests/data/text/example72.txt similarity index 100% rename from tests/data/text/filter44.txt rename to tests/data/text/example72.txt diff --git a/tests/data/text/filter45.txt b/tests/data/text/example73.txt similarity index 100% rename from tests/data/text/filter45.txt rename to tests/data/text/example73.txt diff --git a/tests/data/text/filter46.txt b/tests/data/text/example74.txt similarity index 100% rename from tests/data/text/filter46.txt rename to tests/data/text/example74.txt diff --git a/tests/data/text/filter47.txt b/tests/data/text/example75.txt similarity index 100% rename from tests/data/text/filter47.txt rename to tests/data/text/example75.txt diff --git a/tests/data/text/filter48.txt b/tests/data/text/example76.txt similarity index 100% rename from tests/data/text/filter48.txt rename to tests/data/text/example76.txt diff --git a/tests/data/text/filter49.txt b/tests/data/text/example77.txt similarity index 100% rename from tests/data/text/filter49.txt rename to tests/data/text/example77.txt diff --git a/tests/data/text/filter50.txt b/tests/data/text/example78.txt similarity index 100% rename from tests/data/text/filter50.txt rename to tests/data/text/example78.txt diff --git a/tests/data/text/filter51.txt b/tests/data/text/example79.txt similarity index 100% rename from tests/data/text/filter51.txt rename to tests/data/text/example79.txt diff --git a/tests/data/text/filter52.txt b/tests/data/text/example80.txt similarity index 100% rename from tests/data/text/filter52.txt rename to tests/data/text/example80.txt diff --git a/tests/data/text/filter53.txt b/tests/data/text/example81.txt similarity index 100% rename from tests/data/text/filter53.txt rename to tests/data/text/example81.txt diff --git a/tests/data/text/filter54.txt b/tests/data/text/example82.txt similarity index 100% rename from tests/data/text/filter54.txt rename to tests/data/text/example82.txt diff --git a/tests/data/text/filter55.txt b/tests/data/text/example83.txt similarity index 100% rename from tests/data/text/filter55.txt rename to tests/data/text/example83.txt diff --git a/tests/data/text/filter56.txt b/tests/data/text/example84.txt similarity index 100% rename from tests/data/text/filter56.txt rename to tests/data/text/example84.txt diff --git a/tests/data/text/filter57-alt01.txt b/tests/data/text/example85-alt01.txt similarity index 100% rename from tests/data/text/filter57-alt01.txt rename to tests/data/text/example85-alt01.txt diff --git a/tests/data/text/filter57.txt b/tests/data/text/example85.txt similarity index 100% rename from tests/data/text/filter57.txt rename to tests/data/text/example85.txt diff --git a/tests/data/text/filter58.txt b/tests/data/text/example86.txt similarity index 100% rename from tests/data/text/filter58.txt rename to tests/data/text/example86.txt diff --git a/tests/data/text/filter20.txt b/tests/data/text/filter20.txt deleted file mode 100644 index a28311b..0000000 --- a/tests/data/text/filter20.txt +++ /dev/null @@ -1 +0,0 @@ -S_TOUCHES("geometry", MULTILINESTRING ((-1.9 -0.99999, 75.292574 1.5, -0.5 -4.016458, -31.708594 -74.743801, 179.0 -90.0), (-1.9 -1.1, 1.5 8.547371))) diff --git a/tests/data/text/filter28.txt b/tests/data/text/filter28.txt deleted file mode 100644 index 70e7923..0000000 --- a/tests/data/text/filter28.txt +++ /dev/null @@ -1 +0,0 @@ -T_DISJOINT(INTERVAL('..', '2005-01-10T01:01:01.393216Z'), "coverage_date") diff --git a/tests/data/text/filter29.txt b/tests/data/text/filter29.txt deleted file mode 100644 index 569d133..0000000 --- a/tests/data/text/filter29.txt +++ /dev/null @@ -1 +0,0 @@ -T_DURING(INTERVAL("created_at", "updated_at"), INTERVAL('2005-01-10', '2010-02-10')) diff --git a/tests/data/text/filter31.txt b/tests/data/text/filter31.txt deleted file mode 100644 index 0d13390..0000000 --- a/tests/data/text/filter31.txt +++ /dev/null @@ -1 +0,0 @@ -T_FINISHEDBY("coverage_date", INTERVAL('1991-10-07T08:21:06.393262Z', '2010-02-10T05:29:20.073225Z')) diff --git a/tests/data/text/filter32.txt b/tests/data/text/filter32.txt deleted file mode 100644 index 8fbd953..0000000 --- a/tests/data/text/filter32.txt +++ /dev/null @@ -1 +0,0 @@ -T_FINISHES("coverage_dates", INTERVAL('1991-10-07', '2010-02-10T05:29:20.073225Z')) diff --git a/tests/data/text/filter33.txt b/tests/data/text/filter33.txt deleted file mode 100644 index a11e56f..0000000 --- a/tests/data/text/filter33.txt +++ /dev/null @@ -1 +0,0 @@ -T_INTERSECTS("coverage_date", INTERVAL('1991-10-07T08:21:06.393262Z', '2010-02-10T05:29:20.073225Z')) diff --git a/tests/data/text/filter34.txt b/tests/data/text/filter34.txt deleted file mode 100644 index 0fc7a8a..0000000 --- a/tests/data/text/filter34.txt +++ /dev/null @@ -1 +0,0 @@ -T_MEETS(INTERVAL('2005-01-10', '2010-02-10'), "coverage_dates") diff --git a/tests/data/text/filter35.txt b/tests/data/text/filter35.txt deleted file mode 100644 index 3680cd6..0000000 --- a/tests/data/text/filter35.txt +++ /dev/null @@ -1 +0,0 @@ -T_METBY(INTERVAL('2010-02-10T05:29:20.073225Z', '2010-10-07'), "coverage_dates") diff --git a/tests/data/text/filter37.txt b/tests/data/text/filter37.txt deleted file mode 100644 index 12a944b..0000000 --- a/tests/data/text/filter37.txt +++ /dev/null @@ -1 +0,0 @@ -T_OVERLAPS("coverage_date", INTERVAL('1991-10-07T08:21:06.393262Z', '1992-10-09T08:08:08.393473Z')) diff --git a/tests/data/text/filter39.txt b/tests/data/text/filter39.txt deleted file mode 100644 index 30403f6..0000000 --- a/tests/data/text/filter39.txt +++ /dev/null @@ -1 +0,0 @@ -T_STARTS("coverage_dates", INTERVAL('1991-10-07T08:21:06.393262Z', '..')) diff --git a/tests/data/text/filter55-alt01.txt b/tests/data/text/filter55-alt01.txt deleted file mode 100644 index 4aaa886..0000000 --- a/tests/data/text/filter55-alt01.txt +++ /dev/null @@ -1 +0,0 @@ -S_EQUALS(MULTIPOINT (180.0 -0.5, 179.0 -47.121701, 180.0 -0.0, 33.470475 -0.99999, 179.0 -15.333062), "geometry") diff --git a/tests/data/text/filter59.txt b/tests/data/text/filter59.txt deleted file mode 100644 index 8388b48..0000000 --- a/tests/data/text/filter59.txt +++ /dev/null @@ -1 +0,0 @@ -"owner" = CASEI(ACCENTI('Beyoncé')) diff --git a/tests/data/text/filter60-alt01.txt b/tests/data/text/filter60-alt01.txt deleted file mode 100644 index 95487a3..0000000 --- a/tests/data/text/filter60-alt01.txt +++ /dev/null @@ -1 +0,0 @@ -"name" = 'King''s Landing' diff --git a/tests/data/text/filter60.txt b/tests/data/text/filter60.txt deleted file mode 100644 index fd24d61..0000000 --- a/tests/data/text/filter60.txt +++ /dev/null @@ -1 +0,0 @@ -"name" = 'King\'s Landing' diff --git a/tests/data/text/filter61-alt01.txt b/tests/data/text/filter61-alt01.txt deleted file mode 100644 index 651bb65..0000000 --- a/tests/data/text/filter61-alt01.txt +++ /dev/null @@ -1 +0,0 @@ -NOT (value > 10) OR (foo = 2) diff --git a/tests/data/text/filter61.txt b/tests/data/text/filter61.txt deleted file mode 100644 index 7c76099..0000000 --- a/tests/data/text/filter61.txt +++ /dev/null @@ -1 +0,0 @@ -(NOT "value" > 10 OR "foo" = 2) diff --git a/tests/test_pycql2.py b/tests/test_pycql2.py index 0c100b6..b31c338 100644 --- a/tests/test_pycql2.py +++ b/tests/test_pycql2.py @@ -54,21 +54,38 @@ def test_parse_bad_text(file_name: str) -> None: @pytest.mark.parametrize("file_name", json_files) def test_json_to_text(file_name: str) -> None: - """Test that the pydantic model outputs the correct text representation.""" + """ + Test that the pydantic model outputs the correct text representation + by comparing the tree generated by parsing the text representation + returned and comparing to the parsed text representation. + """ json_file = JSON_DIR / file_name # Load the json data - model = BooleanExpression.model_validate_json(json_file.read_text()) + json_model = BooleanExpression.model_validate_json(json_file.read_text()) + # Convert the json data to a string + json_string = str(json_model) + # Parse the generated CQL2 Text + json_string_parsed = parser.parse(json_string) + json_string_transformed = transformer.transform(json_string_parsed) + # Load the expected text data text_file = TEXT_DIR / (json_file.stem + ".txt") - expected = text_file.read_text().strip() + text_string = text_file.read_text().strip() + text_string_parsed = parser.parse(text_string) + text_string_transformed = transformer.transform(text_string_parsed) + # Compare the two - assert str(model) == expected + assert json_string_transformed == text_string_transformed @pytest.mark.parametrize("file_name", text_files) def test_text_to_json(file_name: str) -> None: - """Test that the parser outputs the correct json representation.""" + """ + Test that the tree generated from the text is the same + as the tree generated from the text which is generated + from the text output from the json. + """ text_file = TEXT_DIR / file_name # Load the text data @@ -79,5 +96,5 @@ def test_text_to_json(file_name: str) -> None: json_file = JSON_DIR / (text_file.stem.split("-")[0] + ".json") # Load the expected json data expected = BooleanExpression.model_validate_json(json_file.read_text()) - # Compare the two + # Compare the pydantic models generated from json and text assert output == expected