diff --git a/test/runtests.jl b/test/runtests.jl index eb0fc78..7cc19d9 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,9 @@ using SymbolicIndexingInterface using Test -@testset begin +@testset "Interface test" begin @time include("example_test.jl") end +@testset "Trait test" begin + @time include("trait_test.jl") +end diff --git a/test/trait_test.jl b/test/trait_test.jl new file mode 100644 index 0000000..9665509 --- /dev/null +++ b/test/trait_test.jl @@ -0,0 +1,14 @@ +using SymbolicUtils +using Symbolics +using SymbolicIndexingInterface +using Test + +@test all(issymbolic.([Int, Float64, String, Bool, UInt, Complex{Float64}]) .== + (NotSymbolic(),)) +@test all(issymbolic.([Symbol, SymbolicUtils.BasicSymbolic, Symbolics.Num]) .== + (Symbolic(),)) +@variables x +@test issymbolic(x) == Symbolic() +@variables y[1:3] +@test issymbolic(y) == NotSymbolic() +@test all(issymbolic.(collect(y)) .== (Symbolic(),))