Skip to content

Commit 323380f

Browse files
test: mark SciMLStructures.replace type-stability tests as broken
1 parent 500cd49 commit 323380f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

test/mtkparameters.jl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,21 @@ end
183183
@testset "Type stability of $portion" for portion in [
184184
Tunable(), Discrete(), Constants()]
185185
@test_call canonicalize(portion, ps)
186-
# @inferred canonicalize(portion, ps)
187-
broken = (i [2, 3] && portion == Tunable())
186+
@inferred canonicalize(portion, ps)
188187

189188
# broken because the size of a vector of vectors can't be determined at compile time
190-
@test_opt broken=broken target_modules=(ModelingToolkit,) canonicalize(
189+
@test_opt target_modules=(ModelingToolkit,) canonicalize(
191190
portion, ps)
192191

193192
buffer, repack, alias = canonicalize(portion, ps)
194193

195-
@test_call SciMLStructures.replace(portion, ps, ones(length(buffer)))
196-
@inferred SciMLStructures.replace(portion, ps, ones(length(buffer)))
197-
@test_opt target_modules=(ModelingToolkit,) SciMLStructures.replace(
194+
# broken because dependent update functions break inference
195+
@test_call target_modules=(ModelingToolkit,) SciMLStructures.replace(
196+
portion, ps, ones(length(buffer)))
197+
@test_throws Exception @inferred SciMLStructures.replace(
198+
portion, ps, ones(length(buffer)))
199+
@inferred MTKParameters SciMLStructures.replace(portion, ps, ones(length(buffer)))
200+
@test_opt target_modules=(ModelingToolkit,) broken=true SciMLStructures.replace(
198201
portion, ps, ones(length(buffer)))
199202

200203
@test_call target_modules=(ModelingToolkit,) SciMLStructures.replace!(

0 commit comments

Comments
 (0)