Skip to content

Commit 1e5450b

Browse files
test: move Symbolics tests to Symbolics downstream
1 parent 2f13f30 commit 1e5450b

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

.github/workflows/Downstream.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
os: [ubuntu-latest]
1919
package:
2020
- {user: SciML, repo: RecursiveArrayTools.jl, group: All}
21+
- {user: JuliaSymbolics, repo: Symbolics.jl, group: SymbolicIndexingInterface}
2122
steps:
2223
- uses: actions/checkout@v2
2324
- uses: julia-actions/setup-julia@v1

test/parameter_indexing_test.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using SymbolicIndexingInterface
2-
using Symbolics
32

43
struct FakeIntegrator{P}
54
p::P
@@ -8,11 +7,10 @@ end
87
SymbolicIndexingInterface.symbolic_container(fp::FakeIntegrator) = fp.sys
98
SymbolicIndexingInterface.parameter_values(fp::FakeIntegrator) = fp.p
109

11-
@variables a[1:2] b
12-
sys = SymbolCache([:x, :y, :z], [a[1], a[2], b], [:t])
13-
p = [1.0, 2.0, 3.0]
10+
sys = SymbolCache([:x, :y, :z], [:a, :b], [:t])
11+
p = [1.0, 2.0]
1412
fi = FakeIntegrator(copy(p))
15-
for (i, sym) in [(1, a[1]), (2, a[2]), (3, b), ([1,2], a), ([1, 3], [a[1], b]), ((2, 3), (a[2], b))]
13+
for (i, sym) in [(1, :a), (2, :b), ([1, 2], [:a, :b]), ((1, 2), (:a, :b))]
1614
get = getp(sys, sym)
1715
set! = setp(sys, sym)
1816
true_value = i isa Tuple ? getindex.((p,), i) : p[i]

test/trait_test.jl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
using SymbolicUtils
2-
using Symbolics
31
using SymbolicIndexingInterface
42
using Test
53

64
@test all(symbolic_type.([Int, Float64, String, Bool, UInt, Complex{Float64}]) .==
75
(NotSymbolic(),))
8-
@test all(symbolic_type.([Symbol, SymbolicUtils.BasicSymbolic, Symbolics.Num]) .==
9-
(ScalarSymbolic(),))
10-
@test symbolic_type(Symbolics.Arr) == ArraySymbolic()
11-
@variables x
12-
@test symbolic_type(x) == ScalarSymbolic()
13-
@variables y[1:3]
14-
@test symbolic_type(y) == ArraySymbolic()
15-
@test all(symbolic_type.(collect(y)) .== (ScalarSymbolic(),))
6+
@test symbolic_type(Symbol) == ScalarSymbolic()

0 commit comments

Comments
 (0)