Skip to content

Commit

Permalink
Fix all calls of it
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Sep 13, 2023
1 parent 470bde7 commit 1291ab0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pkg/JuliaInterface/tst/convert.tst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ gap> ForAll([0..64], n -> Julia.GAP.Obj( -big2^n ) = -2^n);
true

#
gap> string := GAPToJulia( Julia.Base.AbstractString, "bla" );
gap> string := GAPToJulia( Julia.Base.String, "bla" );
<Julia: "bla">
gap> JuliaToGAP( IsString, string );
"bla"
Expand Down Expand Up @@ -221,7 +221,7 @@ Error, <obj> must be a Julia range
## empty list vs. empty string
gap> emptylist:= GAPToJulia( JuliaEvalString( "Vector{Any}"), [] );
<Julia: Any[]>
gap> emptystring:= GAPToJulia( Julia.Base.AbstractString, "" );
gap> emptystring:= GAPToJulia( Julia.Base.String, "" );
<Julia: "">
gap> JuliaToGAP( IsList, emptylist );
[ ]
Expand Down
2 changes: 1 addition & 1 deletion test/basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ end

@test_throws ErrorException GAP.Globals.FOOBARQUX

str = GAP.gap_to_julia(AbstractString, GAP.ValueGlobalVariable("IdentifierLetters"))
str = GAP.gap_to_julia(String, GAP.ValueGlobalVariable("IdentifierLetters"))
@test str == "0123456789@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"

@test GAP.CanAssignGlobalVariable("Read") == false
Expand Down
3 changes: 1 addition & 2 deletions test/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,13 @@
@test (@inferred String(x)) == "abc"
x = GAP.evalstr("\"foo\"")
@test (@inferred String(x)) == "foo"
@test AbstractString(x) == "foo"
end

@testset "Symbols" begin
x = GAP.evalstr("\"foo\"")
@test (@inferred Symbol(x)) == :foo
x = GAP.evalstr("(1,2,3)")
@test_throws GAP.ConversionError AbstractString(x)
@test_throws GAP.ConversionError String(x)

# Convert GAP string to Vector{UInt8} (==Vector{UInt8})
x = GAP.evalstr("\"foo\"")
Expand Down
3 changes: 1 addition & 2 deletions test/conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
@test (@inferred GAP.gap_to_julia(String, x)) == "abc"
x = GAP.evalstr("\"foo\"")
@test (@inferred GAP.gap_to_julia(String, x)) == "foo"
@test GAP.gap_to_julia(AbstractString, x) == "foo"
@test GAP.gap_to_julia(x) == "foo"
x = "abc\000def"
@test GAP.gap_to_julia(GAP.julia_to_gap(x)) == x
Expand All @@ -102,7 +101,7 @@
x = GAP.evalstr("\"foo\"")
@test (@inferred GAP.gap_to_julia(Symbol, x)) == :foo
x = GAP.evalstr("(1,2,3)")
@test_throws GAP.ConversionError GAP.gap_to_julia(AbstractString, x)
@test_throws GAP.ConversionError GAP.gap_to_julia(String, x)

# Convert GAP string to Vector{UInt8} (==Vector{UInt8})
x = GAP.evalstr("\"foo\"")
Expand Down

0 comments on commit 1291ab0

Please sign in to comment.