Skip to content

Commit

Permalink
Added test for GAP exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasguts authored and fingolfin committed Nov 8, 2018
1 parent 49a460e commit 7fa8432
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LibGAP.jl/src/initialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ read_sysinfo_gap = function(dir::String)
return d
end

function error_handler(message)
function error_handler()
error("Error thrown by GAP")
end

error_handler_func = @cfunction(error_handler,Cvoid,(Ptr{Char},))
error_handler_func = @cfunction(error_handler,Cvoid,())

const pkgdir = realpath(dirname(@__FILE__))

Expand Down
3 changes: 3 additions & 0 deletions LibGAP.jl/test/basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
@test GAP.True
@test ! GAP.False


xx = GAP.to_gap([1,2,3])
@test_throws ErrorException xx[4]
end

0 comments on commit 7fa8432

Please sign in to comment.