Skip to content

Commit

Permalink
Add missing "min version" checks to TestViewshedCreationOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
pericles-tpt committed Jan 28, 2025
1 parent b6ff5fd commit 9f67065
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions godal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4572,6 +4572,16 @@ func TestViewshedSimpleHeight(t *testing.T) {
}

func TestViewshedCreationOptions(t *testing.T) {
if !CheckMinVersion(3, 1, 0) {
_, err := Viewshed(Band{}, nil, "none", 1, 1, 0, 0, 255, 0, 0, -1, 0, MEdge, 0, Normal)
assert.EqualError(t, err, "failed to run, 'viewshed' not supported on GDAL versions < 3.1.0")
return
} else if !CheckMinVersion(3, 4, 2) {
_, err := Viewshed(Band{}, nil, "none", 1, 1, 0, 0, 255, 0, 0, -1, 0, MEdge, 0, Normal)
assert.EqualError(t, err, "cannot run 'viewshed' with GDAL version <= 3.4.1, as some tests produce invalid results under these conditions")
return
}

var (
driver = GTiff
tmpname = tempfile()
Expand Down

0 comments on commit 9f67065

Please sign in to comment.