Skip to content

Commit

Permalink
Add a test for improved printResultInfo(..)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinOtter committed May 2, 2022
1 parent b407ed5 commit 86d2311
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ function signalInfo2(result, name::AbstractString)
(timeSignal, signal, sigType) = rawSignal(result,name)
if ismissing(signal) || isnothing(signal) || !(typeof(signal) <: AbstractArray) || signalLength(signal) == 0
hasDimensionMismatch(signal, name, timeSignal, timeSignalName(result))
return (sigType, 0, nothing, nothing, nothing)
return (sigType, 0, nothing, nothing, nothing, nothing)
end

oneSigValue = length(signal) == 1 && typeof(signal[1]) <: OneValueVector
Expand Down
3 changes: 2 additions & 1 deletion test/test_20_SeveralSignalsInOneDiagram.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ result["phi"] = sin.(t)u"rad"
result["phi2"] = 0.5 * sin.(t)u"rad"
result["w"] = cos.(t)u"rad/s"
result["w2"] = 0.6 * cos.(t)u"rad/s"
result["A"] = ModiaResult.OneValueVector(0.6, length(t))

println("\n... test_20_SeveralSignalsInOneDiagram:")
ModiaResult.printResultInfo(result)

plot(result, ("phi", "phi2", "w", "w2"), heading="Several signals in one diagram")
plot(result, ("phi", "phi2", "w", "w2", "A"), heading="Several signals in one diagram")

end

0 comments on commit 86d2311

Please sign in to comment.