Skip to content

Commit

Permalink
Added dummy TZ shapefile with test timezone polygons
Browse files Browse the repository at this point in the history
  • Loading branch information
oxidase committed May 10, 2017
1 parent 84b33ac commit 4da0582
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 33 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,5 +358,9 @@ script:
if [ -z "${ENABLE_SANITIZER}" ] && [ "$TARGET_ARCH" != "i686" ]; then
npm run nodejs-tests
fi
- |
if [ "${ENABLE_MASON}" == "ON" ]; then
npm run test-conditionals
fi
- popd
- yarn test
6 changes: 4 additions & 2 deletions cucumber.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module.exports = {
default: '--strict --tags ~@stress --tags ~@todo --require features/support --require features/step_definitions',
default: '--strict --tags ~@stress --tags ~@todo --require features/support --require features/step_definitions',
verify: '--strict --tags ~@stress --tags ~@todo -f progress --require features/support --require features/step_definitions',
todo: '--strict --tags @todo --require features/support --require features/step_definitions',
all: '--strict --require features/support --require features/step_definitions',
mld: '--strict --tags ~@stress --tags ~@todo --tags ~@alternative --tags ~@matrix --tags ~@trip --require features/support --require features/step_definitions -f progress',
mld: '--strict --tags ~@stress --tags ~@todo --tags ~@alternative --tags ~@matrix --tags ~@trip --tags ~@shapelib --require features/support --require features/step_definitions -f progress',
conditionals: '--strict --tags @conditionals --require features/support --require features/step_definitions',
mld_conditionals: '--strict --tags @conditionals --require features/support --require features/step_definitions -f progress'
}
60 changes: 30 additions & 30 deletions features/car/conditional_restrictions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ Feature: Car - Turn restrictions
| a | c | albic,dobe,dobe,albic,albic | depart,turn left,turn uturn,turn left,arrive |
| a | e | albic,dobe,dobe | depart,turn left,arrive |

@todo @no_turning @conditionals
@shapelib @no_turning @conditionals
Scenario: Car - only_right_turn
Given the extract extra arguments "--parse-conditional-restrictions"
# time stamp for 10am on Tues, 02 May 2017 GMT
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the node map
"""
n
Expand All @@ -385,12 +385,12 @@ Feature: Car - Turn restrictions
| e | n | ej,nj,nj |
| e | p | ej,nj,nj,jp,jp |

@todo @no_turning @conditionals
@shapelib @no_turning @conditionals
Scenario: Car - No right turn
Given the extract extra arguments "--parse-conditional-restrictions"
# time stamp for 10am on Tues, 02 May 2017 GMT
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the node map
"""
n
Expand All @@ -415,12 +415,12 @@ Feature: Car - Turn restrictions
| e | n | ej,js,js,nj,nj | avoids right turn |
| e | p | ej,jp,jp | normal maneuver |

@todo @only_turning @conditionals
@shapelib @only_turning @conditionals
Scenario: Car - only_left_turn
Given the extract extra arguments "--parse-conditional-restrictions"
# time stamp for 10am on Tues, 02 May 2017 GMT
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the node map
"""
n
Expand All @@ -445,12 +445,12 @@ Feature: Car - Turn restrictions
| e | n | ej,js,js,nj,nj |
| e | p | ej,js,js,jp,jp |

@todo @no_turning @conditionals
@shapelib @no_turning @conditionals
Scenario: Car - No left turn
Given the extract extra arguments "--parse-conditional-restrictions"
# time stamp for 10am on Tues, 02 May 2017 GMT
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the node map
"""
n
Expand All @@ -475,12 +475,12 @@ Feature: Car - Turn restrictions
| e | n | ej,nj,nj |
| e | p | ej,jp,jp |

@todo @no_turning @conditionals
@shapelib @no_turning @conditionals
Scenario: Car - Conditional restriction is off
Given the extract extra arguments "--parse-conditional-restrictions"
# time stamp for 10am on Tues, 02 May 2017 GMT
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493719200"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493719200"
Given the node map
"""
n
Expand All @@ -505,12 +505,12 @@ Feature: Car - Turn restrictions
| e | n | ej,nj,nj |
| e | p | ej,jp,jp |

@todo @no_turning @conditionals
@shapelib @no_turning @conditionals
Scenario: Car - Conditional restriction is on
Given the extract extra arguments "--parse-conditional-restrictions"
# 10am utc, wed
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493805600"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493805600"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493805600"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493805600"
Given the node map
"""
n
Expand All @@ -535,12 +535,12 @@ Feature: Car - Turn restrictions
| e | n | ej,js,js,nj,nj |
| e | p | ej,jp,jp |

@todo @no_turning @conditionals
@shapelib @no_turning @conditionals
Scenario: Car - Conditional restriction with multiple time windows
Given the extract extra arguments "--parse-conditional-restrictions"
# 5pm Wed 02 May, 2017 GMT
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493744400"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493744400"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493744400"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493744400"

Given the node map
"""
Expand Down Expand Up @@ -569,12 +569,12 @@ Feature: Car - Turn restrictions
| m | p | mj,jp,jp |

# https://www.openstreetmap.org/#map=18/38.91099/-77.00888
@todo @no_turning @conditionals
@shapelib @no_turning @conditionals
Scenario: Car - DC North capitol situation, two on one off
Given the extract extra arguments "--parse-conditional-restrictions=1"
# 9pm Wed 02 May, 2017 UTC, 5pm EST
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493845200"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493845200"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493845200"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493845200"

# """
# a h
Expand Down Expand Up @@ -616,12 +616,12 @@ Feature: Car - Turn restrictions
| f | d | cap north,florida,florida nw | depart,turn left,arrive |
| e | c | florida ne,florida nw,cap south,cap south | depart,continue uturn,turn right,arrive |

@todo @no_turning @conditionals
@shapelib @no_turning @conditionals
Scenario: Car - DC North capitol situation, one on two off
Given the extract extra arguments "--parse-conditional-restrictions=1"
# 10:30am utc, wed, 6:30am est
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493807400"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493807400"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493807400"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493807400"

# """
# a h
Expand Down Expand Up @@ -663,12 +663,12 @@ Feature: Car - Turn restrictions
| f | d | cap north,florida ne,florida ne,florida nw | depart,turn sharp right,turn uturn,arrive |
| e | c | florida ne,cap south,cap south | depart,turn left,arrive |

@todo @only_turning @conditionals
@shapelib @only_turning @conditionals
Scenario: Car - Somewhere in Liverpool, the UK, GMT timezone
Given the extract extra arguments "--parse-conditional-restrictions=1"
# 9am UTC, 10am BST
Given the contract extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493802000"
Given the customize extra arguments "--time-zone-file=test/data/tz_world.shp --parse-conditionals-from-now=1493802000"
Given the contract extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493802000"
Given the customize extra arguments "--time-zone-file=test/data/tz/OGRGeoJSON.shp --parse-conditionals-from-now=1493802000"

# """
# a
Expand Down
Binary file added test/data/tz/OGRGeoJSON.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions test/data/tz/OGRGeoJSON.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
Binary file added test/data/tz/OGRGeoJSON.shp
Binary file not shown.
Binary file added test/data/tz/OGRGeoJSON.shx
Binary file not shown.
Binary file removed test/data/tz_world.dbf
Binary file not shown.
Binary file removed test/data/tz_world.png
Binary file not shown.
1 change: 0 additions & 1 deletion test/data/tz_world.prj

This file was deleted.

Binary file removed test/data/tz_world.shp
Binary file not shown.
Binary file removed test/data/tz_world.shx
Binary file not shown.

0 comments on commit 4da0582

Please sign in to comment.