Skip to content

Commit

Permalink
test: mark SciMLStructures.replace type-stability tests as broken
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Aug 2, 2024
1 parent 500cd49 commit 323380f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/mtkparameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,21 @@ end
@testset "Type stability of $portion" for portion in [
Tunable(), Discrete(), Constants()]
@test_call canonicalize(portion, ps)
# @inferred canonicalize(portion, ps)
broken = (i [2, 3] && portion == Tunable())
@inferred canonicalize(portion, ps)

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

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

@test_call SciMLStructures.replace(portion, ps, ones(length(buffer)))
@inferred SciMLStructures.replace(portion, ps, ones(length(buffer)))
@test_opt target_modules=(ModelingToolkit,) SciMLStructures.replace(
# broken because dependent update functions break inference
@test_call target_modules=(ModelingToolkit,) SciMLStructures.replace(
portion, ps, ones(length(buffer)))
@test_throws Exception @inferred SciMLStructures.replace(
portion, ps, ones(length(buffer)))
@inferred MTKParameters SciMLStructures.replace(portion, ps, ones(length(buffer)))
@test_opt target_modules=(ModelingToolkit,) broken=true SciMLStructures.replace(
portion, ps, ones(length(buffer)))

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

0 comments on commit 323380f

Please sign in to comment.