Skip to content

Commit 0b1dc52

Browse files
yeesianvisr
authored andcommitted
fix tests to check for the right type of error
1 parent 6998c93 commit 0b1dc52

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/test_geos_functions.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ end
198198
@test LibGEOS.getX(cs_, 1) x atol = 1e-5
199199
@test LibGEOS.getY(cs_, 1) y atol = 1e-5
200200
@test LibGEOS.getZ(cs_, 1) z atol = 1e-5
201-
@test_throws MethodError LibGEOS.getX(cs_, 0, x)
202-
@test_throws MethodError LibGEOS.getX(cs_, 2, x)
203-
@test_throws MethodError LibGEOS.getY(cs_, 0, y)
204-
@test_throws MethodError LibGEOS.getY(cs_, 2, y)
205-
@test_throws MethodError LibGEOS.getZ(cs_, 0, z)
206-
@test_throws MethodError LibGEOS.getZ(cs_, 2, z)
201+
@test_throws ErrorException LibGEOS.getX(cs_, 0)
202+
@test_throws ErrorException LibGEOS.getX(cs_, 2)
203+
@test_throws ErrorException LibGEOS.getY(cs_, 0)
204+
@test_throws ErrorException LibGEOS.getY(cs_, 2)
205+
@test_throws ErrorException LibGEOS.getZ(cs_, 0)
206+
@test_throws ErrorException LibGEOS.getZ(cs_, 2)
207207

208208
cs_ = LibGEOS.createCoordSeq(1, ndim = 3)
209209
@test LibGEOS.getSize(cs_) == 1

0 commit comments

Comments
 (0)