Skip to content

Commit 19ddbb4

Browse files
authored
Fix tests for GDAL 3.6 release. (#356)
1 parent b4844ca commit 19ddbb4

File tree

5 files changed

+57
-24
lines changed

5 files changed

+57
-24
lines changed

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Added CHANGELOG.md
13+
14+
### Fixed
15+
16+
17+
### Changed
18+
19+
- breaking: Updated compat for GDAL.jl 1.5 and fixed tests for GDAL 3.6. These include changes to `gdalnearblack`, `fillunsetwithdefault!` and `gdalgetgeotransform`.
20+
21+
## [0.9.4] - 2022-12-30
22+
23+
### Fixed
24+
25+
- Fix macro callback. [#352](https://github.com/yeesian/ArchGDAL.jl/pull/352)
26+
27+
### Changed
28+
29+
- Let's handle pointers in ccall using unsafe_convert [#349](https://github.com/yeesian/ArchGDAL.jl/pull/349)

Project.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ uuid = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
33
keywords = ["GDAL", "IO"]
44
license = "MIT"
55
desc = "A high level API for GDAL - Geospatial Data Abstraction Library"
6-
version = "0.9.4"
6+
version = "0.10.0"
77

88
[deps]
99
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
@@ -12,7 +12,6 @@ Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
1212
DiskArrays = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3"
1313
Extents = "411431e0-e8b7-467b-b5e0-f676ba4f2910"
1414
GDAL = "add2ef01-049f-52c4-9ee2-e494f65e021a"
15-
GDAL_jll = "a7073274-a066-55f0-b90d-d619367d196c"
1615
GeoFormatTypes = "68eda718-8dee-11e9-39e7-89f7f65f511f"
1716
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
1817
GeoInterfaceRecipes = "0329782f-3d07-4b52-b9f6-d3137cf03c7a"
@@ -24,8 +23,7 @@ CEnum = "0.4"
2423
ColorTypes = "0.10, 0.11"
2524
DiskArrays = "0.3"
2625
Extents = "0.1"
27-
GDAL = "1.3"
28-
GDAL_jll = "300.400 - 300.500"
26+
GDAL = "1.5"
2927
GeoFormatTypes = "0.3, 0.4"
3028
GeoInterface = "1"
3129
GeoInterfaceRecipes = "1.0"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ To test if it is installed correctly,
3333
pkg> test ArchGDAL
3434
```
3535

36+
Please see the [changelog](CHANGELOG.md) for any changes in the installed version.
37+
3638
## Getting Involved
3739

3840
### Community

test/test_feature.jl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,12 @@ end
125125

126126
# set & notnull: value
127127
AG.fillunsetwithdefault!(f, notnull = false)
128-
# now the field is set to the default
129-
@test AG.getfield(f, 1) == AG.getdefault(f, 1)
128+
if !AG.isdefaultdriverspecific(AG.getfielddefn(f, 1))
129+
# now the field is set to the default
130+
@test AG.getfield(f, 1) == AG.getdefault(f, 1)
131+
@test AG.isfieldset(f, 1) # the field is now set
132+
end
130133
@test !AG.isfieldnull(f, 1) # still as expected
131-
@test AG.isfieldset(f, 1) # the field is now set
132134

133135
# set the field to be notnullable
134136
AG.setnullable!(AG.getfielddefn(f, 1), false)
@@ -139,12 +141,14 @@ end
139141
@test isnothing(AG.getfield(f, 1))
140142
# and we fill unset with default again
141143
AG.fillunsetwithdefault!(f)
142-
# the field is set to the default
143-
@test AG.getfield(f, 1) == AG.getdefault(f, 1)
144+
if !AG.isdefaultdriverspecific(AG.getfielddefn(f, 1))
145+
# the field is set to the default
146+
@test AG.getfield(f, 1) == AG.getdefault(f, 1)
147+
@test AG.isfieldset(f, 1)
148+
end
149+
@test !AG.isfieldnull(f, 1)
144150

145151
# set & null: missing
146-
@test !AG.isfieldnull(f, 1)
147-
@test AG.isfieldset(f, 1)
148152
AG.setfieldnull!(f, 1)
149153
@test AG.isfieldnull(f, 1)
150154
@test AG.isfieldset(f, 1)

test/test_gdalutilities.jl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ using Test
6767
ds_tiny,
6868
["-of", "GTiff", "-color", "0"],
6969
) do ds_nearblack
70-
@test AG.read(ds_nearblack, 1) == [
71-
0 0 0 0 0
72-
0 0 0 0 0
73-
0 0 177 0 0
74-
0 0 0 0 0
75-
0 0 0 0 0
70+
@test AG.read(ds_nearblack, 1) == UInt8[
71+
0x80 0xab 0x7f 0x5d 0x53
72+
0x7e 0xa4 0x94 0x72 0x65
73+
0xa1 0xaf 0xb1 0xa4 0x8c
74+
0xb9 0xce 0xcd 0xac 0x80
75+
0xc1 0xcd 0xd1 0xb5 0x7a
7676
]
7777
end
7878
end
@@ -120,7 +120,7 @@ using Test
120120
],
121121
) do ds_grid
122122
@test AG.getgeotransform(ds_grid)
123-
[100.0, 0.1, 0.0, 0.0, 0.0, 0.01]
123+
[100.0, 0.1, 0.0, 0.1, 0.0, -0.01]
124124
end
125125
end
126126

@@ -203,12 +203,12 @@ end
203203
@testset "GDAL Near Black" begin
204204
ds_nearblack =
205205
AG.unsafe_gdalnearblack(ds_tiny, ["-of", "GTiff", "-color", "0"])
206-
@test AG.read(ds_nearblack, 1) == [
207-
0 0 0 0 0
208-
0 0 0 0 0
209-
0 0 177 0 0
210-
0 0 0 0 0
211-
0 0 0 0 0
206+
@test AG.read(ds_nearblack, 1) == UInt8[
207+
0x80 0xab 0x7f 0x5d 0x53
208+
0x7e 0xa4 0x94 0x72 0x65
209+
0xa1 0xaf 0xb1 0xa4 0x8c
210+
0xb9 0xce 0xcd 0xac 0x80
211+
0xc1 0xcd 0xd1 0xb5 0x7a
212212
]
213213
end
214214

0 commit comments

Comments
 (0)