From 470bde701eb1ea095079c470ff62fb4af0604847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Wed, 13 Sep 2023 10:52:03 +0200 Subject: [PATCH 1/3] Remove `(:: Date: Wed, 13 Sep 2023 10:52:30 +0200 Subject: [PATCH 2/3] Fix all calls of it --- pkg/JuliaInterface/tst/convert.tst | 4 ++-- test/basics.jl | 2 +- test/constructors.jl | 3 +-- test/conversion.jl | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pkg/JuliaInterface/tst/convert.tst b/pkg/JuliaInterface/tst/convert.tst index 0d5b9a005..6deea470a 100644 --- a/pkg/JuliaInterface/tst/convert.tst +++ b/pkg/JuliaInterface/tst/convert.tst @@ -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" ); gap> JuliaToGAP( IsString, string ); "bla" @@ -221,7 +221,7 @@ Error, must be a Julia range ## empty list vs. empty string gap> emptylist:= GAPToJulia( JuliaEvalString( "Vector{Any}"), [] ); -gap> emptystring:= GAPToJulia( Julia.Base.AbstractString, "" ); +gap> emptystring:= GAPToJulia( Julia.Base.String, "" ); gap> JuliaToGAP( IsList, emptylist ); [ ] diff --git a/test/basics.jl b/test/basics.jl index 2e872d1ac..19fdcfb87 100644 --- a/test/basics.jl +++ b/test/basics.jl @@ -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 diff --git a/test/constructors.jl b/test/constructors.jl index c442d19e5..8ba7ff088 100644 --- a/test/constructors.jl +++ b/test/constructors.jl @@ -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\"") diff --git a/test/conversion.jl b/test/conversion.jl index a9c39ccd1..a8f78f02d 100644 --- a/test/conversion.jl +++ b/test/conversion.jl @@ -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 @@ -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\"") From 6e57e62558289d2bd7b606c871cb0cb05a5e9b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Wed, 13 Sep 2023 10:53:42 +0200 Subject: [PATCH 3/3] Toggle Aqua switch --- test/Aqua.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Aqua.jl b/test/Aqua.jl index 2f1d4aedb..b7f56d767 100644 --- a/test/Aqua.jl +++ b/test/Aqua.jl @@ -3,7 +3,7 @@ using Aqua @testset "Aqua.jl" begin Aqua.test_all( GAP; - ambiguities=false, # TODO: fix ambiguities + ambiguities=true, unbound_args=true, undefined_exports=true, project_extras=true,