diff --git a/src/FMI2/md.jl b/src/FMI2/md.jl index 4e303ce..e04d347 100644 --- a/src/FMI2/md.jl +++ b/src/FMI2/md.jl @@ -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 @@ -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 diff --git a/src/FMI3/md.jl b/src/FMI3/md.jl index ddaf225..083a2b3 100644 --- a/src/FMI3/md.jl +++ b/src/FMI3/md.jl @@ -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 @@ -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 diff --git a/test/FMI3/model_description.jl b/test/FMI3/model_description.jl index 3d3a7bb..58e3ceb 100644 --- a/test/FMI3/model_description.jl +++ b/test/FMI3/model_description.jl @@ -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