Skip to content

Commit

Permalink
Add tests, increase code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Nov 2, 2023
1 parent aee7200 commit fac6d27
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/JuliaInterface/tst/utils.tst
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,15 @@ function ( arg... )
<<kernel code>> from Julia:parse
end

##
gap> IsBound(Julia.Main.f00bar);
false
gap> Julia.Main.f00bar := 1;
1
gap> IsBound(Julia.Main.f00bar);
true
gap> Unbind(Julia.Main.f00bar);
Error, cannot unbind Julia variables

##
gap> STOP_TEST( "utils.tst", 1 );
3 changes: 3 additions & 0 deletions test/conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
x = GAP.evalstr("'x'")
@test (@inferred GAP.gap_to_julia(Cuchar, x)) == Cuchar('x')
@test GAP.gap_to_julia(x) == Cuchar('x')
@test GAP.gap_to_julia(Char, x) == Char('x')
x = GAP.evalstr("(1,2,3)")
@test_throws GAP.ConversionError GAP.gap_to_julia(Cuchar, x)
end
Expand Down Expand Up @@ -108,6 +109,8 @@
@test (@inferred GAP.gap_to_julia(Vector{UInt8}, x)) == UInt8[0x66, 0x6f, 0x6f]
x = GAP.evalstr("[1,2,3]")
@test (@inferred GAP.gap_to_julia(Vector{UInt8}, x)) == UInt8[1, 2, 3]
x = GAP.evalstr("(1,2,3)")
@test_throws GAP.ConversionError GAP.gap_to_julia(Vector{UInt8}, x)
end

@testset "BitVectors" begin
Expand Down

0 comments on commit fac6d27

Please sign in to comment.