-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix guesses for
Real*Input
and Real*Output
- Loading branch information
1 parent
37faf7b
commit ad7fc59
Showing
3 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using ModelingToolkitStandardLibrary.Blocks | ||
using ModelingToolkit | ||
|
||
@testset "Guesses" begin | ||
for (block, guess) in [ | ||
(RealInput(; name = :a), 0.0), | ||
(RealInput(; nin = 3, name = :a), zeros(3)), | ||
(RealOutput(; name = :a), 0.0), | ||
(RealOutput(; nout = 3, name = :a), zeros(3)), | ||
(RealInputArray(; nin = 3, name = :a), zeros(3)), | ||
(RealOutputArray(; nout = 3, name = :a), zeros(3)), | ||
] | ||
guesses = ModelingToolkit.guesses(block) | ||
@test guesses[@nonamespace block.u] == guess | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change broke Multibody.jl
@AayushSabharwal
Here's a test case that no longer works and it seems related to symbolic arrays, it uses this PR branch of multibody