Skip to content

Commit

Permalink
add decoding tests for codes with length 2 & 3
Browse files Browse the repository at this point in the history
  • Loading branch information
drinckes committed Dec 24, 2024
1 parent 5ce2a74 commit d4287fc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test_data/decoding.csv
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
################################################################################
#
# Test decoding Open Location Codes.
#
# Provides test cases for decoding valid codes.
#
# Format:
# code,length,latLo,lngLo,latHi,lngHi
#
################################################################################
7FG49Q00+,6,20.35,2.75,20.4,2.8
7FG49QCJ+2V,10,20.37,2.782125,20.370125,2.78225
7FG49QCJ+2VX,11,20.3701,2.78221875,20.370125,2.78225
Expand All @@ -20,8 +24,18 @@ CFX30000+,4,89,1,90,2
62H20000+,4,1,-180,2,-179
62H30000+,4,1,-179,2,-178
CFX3X2X2+X2,10,89.9998750,1,90,1.0001250
84000000+,2,30,-122,30,-122
84900000+,3,30,-122,30,-122
################################################################################
#
# Test non-precise latitude/longitude value
#
################################################################################
6FH56C22+22,10,1.2000000000000028,3.4000000000000057,1.2001249999999999,3.4001250000000027
################################################################################
#
# Validate that digits after the first 15 are ignored when decoding
#
################################################################################
849VGJQF+VX7QR3J,15,37.5396691200,-122.3750698242,37.5396691600,-122.3750697021
849VGJQF+VX7QR3J7QR3J,15,37.5396691200,-122.3750698242,37.5396691600,-122.3750697021

0 comments on commit d4287fc

Please sign in to comment.