Skip to content

Commit

Permalink
Try to fix DatabaseTest#test_codes
Browse files Browse the repository at this point in the history
  • Loading branch information
cfis committed Jan 31, 2024
1 parent 92ffbc5 commit e5467f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/database_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ def test_metadata
end

def test_codes
types_with_no_codes = [:PJ_TYPE_TEMPORAL_CRS, :PJ_TYPE_BOUND_CRS, :PJ_TYPE_UNKNOWN, :PJ_TYPE_ENGINEERING_CRS,
if Proj::Api::PROJ_VERSION >= '9.3.0'
types_with_no_codes = [:PJ_TYPE_TEMPORAL_CRS, :PJ_TYPE_BOUND_CRS, :PJ_TYPE_UNKNOWN, :PJ_TYPE_ENGINEERING_CRS,
:PJ_TYPE_TEMPORAL_DATUM, :PJ_TYPE_ENGINEERING_DATUM, :PJ_TYPE_PARAMETRIC_DATUM,
:PJ_TYPE_OTHER_COORDINATE_OPERATION, :PJ_TYPE_DERIVED_PROJECTED_CRS, :PJ_TYPE_COORDINATE_METADATA]
else
types_with_no_codes = [:PJ_TYPE_TEMPORAL_CRS, :PJ_TYPE_BOUND_CRS, :PJ_TYPE_UNKNOWN, :PJ_TYPE_ENGINEERING_CRS,
:PJ_TYPE_TEMPORAL_DATUM, :PJ_TYPE_ENGINEERING_DATUM, :PJ_TYPE_PARAMETRIC_DATUM,
:PJ_TYPE_OTHER_COORDINATE_OPERATION]
end

database = Proj::Database.new(Proj::Context.current)

Expand Down

0 comments on commit e5467f0

Please sign in to comment.