Skip to content

Commit

Permalink
formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
0815Creeper committed Dec 22, 2024
1 parent 35418b5 commit 5e02306
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/FMI2/md.jl
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ function parseUnknown(md::fmi2ModelDescription, node::EzXML.Node)
if length(dependenciesSplit) > 0
varDep.dependencies = collect(parse(UInt, e) for e in dependenciesSplit)
end
else
else
varDep.dependencies = UInt[]
end
end
Expand All @@ -421,7 +421,7 @@ function parseUnknown(md::fmi2ModelDescription, node::EzXML.Node)
stringToDependencyKind(md, e) for e in dependenciesKindSplit
)
end
else
else
varDep.dependenciesKind = fmi2DependencyKind[]
end
end
Expand Down
4 changes: 2 additions & 2 deletions src/FMI3/md.jl
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ function parseDependencies(md::fmi3ModelDescription, node::EzXML.Node)
if length(dependenciesSplit) > 0
varDep.dependencies = collect(parse(UInt, e) for e in dependenciesSplit)
end
else
else
varDep.dependencies = UInt[]
end
end
Expand All @@ -477,7 +477,7 @@ function parseDependencies(md::fmi3ModelDescription, node::EzXML.Node)
varDep.dependenciesKind =
collect(stringToDependencyKind(md, e) for e in dependenciesKindSplit)
end
else
else
varDep.dependenciesKind = fmi3DependencyKind[]
end
end
Expand Down
7 changes: 5 additions & 2 deletions test/FMI3/model_description.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ myFMU = loadFMU("BouncingBall", "ModelicaReferenceFMUs", "0.0.30", "3.0")

@test myFMU.modelDescription.numberOfEventIndicators == 1
@test myFMU.modelDescription.eventIndicatorValueReferences == [1]
@test typeof(myFMU.modelDescription.modelStructure.eventIndicators[1]) == fmi3VariableDependency
@test typeof(myFMU.modelDescription.modelStructure.eventIndicators[1]) ==
fmi3VariableDependency

@test isnothing(myFMU.modelDescription.modelStructure.continuousStateDerivatives[1].dependencies)
@test isnothing(
myFMU.modelDescription.modelStructure.continuousStateDerivatives[1].dependencies,
)


info(myFMU) # check if there is an error thrown
Expand Down

0 comments on commit 5e02306

Please sign in to comment.