Skip to content

Commit

Permalink
add tests tickets:4674
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo authored and OpenModelica-Hudson committed Feb 1, 2018
1 parent 61c89af commit 336fb47
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions openmodelica/interactive-API/Makefile
Expand Up @@ -72,6 +72,7 @@ strings.mos \
variables.mos \
getDefinitions.mos \
StateMachine.mos \
Ticket4674.mos \


# test that currently fail. Move up when fixed.
Expand Down
28 changes: 28 additions & 0 deletions openmodelica/interactive-API/Ticket4674.mo
@@ -0,0 +1,28 @@
within ;
package Ticket4674
model BaseRecord
parameter Real a = 1;
parameter Real b = 1;
parameter Real c = 1;
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(
preserveAspectRatio=false)));
end BaseRecord;

model SpecialRecord
extends Ticket4674.BaseRecord(
a = 2.1,
b = 4.1,
c = 8.1);
extends Ticket4674.Base2(d = 16.1);
parameter Real e = 32.1;

annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(
preserveAspectRatio=false)));
end SpecialRecord;

model Base2
parameter Real d = 1;
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(
preserveAspectRatio=false)));
end Base2;
end Ticket4674;
17 changes: 17 additions & 0 deletions openmodelica/interactive-API/Ticket4674.mos
@@ -0,0 +1,17 @@
// name: Ticket4674.mos
// keywords: API
// status: correct
//
// API to get the instantiated parameters and constants
//


loadFile("Ticket4674.mo");
getInstantiatedParametersAndValues(Ticket4674.SpecialRecord); getErrorString();


// Result:
// true
// {"a = 2.1","b = 4.1","c = 8.1","d = 16.1","e = 32.1"}
// ""
// endResult

0 comments on commit 336fb47

Please sign in to comment.