Skip to content

Commit

Permalink
[NF] Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Feb 7, 2019
1 parent f44d943 commit 8c3a23d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
11 changes: 4 additions & 7 deletions flattening/modelica/scodeinst/TestSampleNoClock.mos
@@ -1,20 +1,17 @@
// name: TestSampleNoClock
// keywords: tests if sample in Modelica 3.2.1 (which sets --std < 3.3) works fine
// keywords: sample
// status: correct
//
// cflags: -d=newInst
// teardown_command: rm -f bn.mo
//
// Tests if sample in Modelica 3.2.1 (which sets --std < 3.3) works fine
//

loadModel(Modelica, {"3.2.1"}); getErrorString();
saveTotalModel("bn.mo", Modelica.Blocks.Examples.BooleanNetwork1); getErrorString();
instantiateModel(Modelica.Blocks.Examples.BooleanNetwork1); getErrorString();

// Result:
// true
// ""
// true
// ""
// "function Modelica.Blocks.Sources.BooleanTable.getFirstIndex \"Get first index of table and check table\"
// input Real[:] table \"Vector of time instants\";
// input Real simulationStartTime(quantity = \"Time\", unit = \"s\") \"Simulation start time\";
Expand Down Expand Up @@ -320,8 +317,8 @@ instantiateModel(Modelica.Blocks.Examples.BooleanNetwork1); getErrorString();
// set1.y = if set1.firstActiveIndex == 0 then if set1.use_pre_as_default then pre(set1.y) else set1.y_default else set1.expr[set1.firstActiveIndex];
// falling.y = edge(falling.not_u);
// changing.y = change(changing.u);
// triggeredAdd.local_set = 0;
// triggeredAdd.local_reset = false;
// triggeredAdd.local_set = 0;
// when {triggeredAdd.trigger, triggeredAdd.local_reset} then
// triggeredAdd.y = if triggeredAdd.local_reset then triggeredAdd.local_set else pre(triggeredAdd.y) + triggeredAdd.u;
// end when;
Expand Down
16 changes: 8 additions & 8 deletions openmodelica/cppruntime/testVectorizedPowerSystem.mos
Expand Up @@ -153,8 +153,8 @@ val(fixedVoltageSource1.p[1], 1.0);
// Equations (5, 5)
// ========================================
// 1/1 (1): system.thetaRef / time = system.omega_internal [dynamic |0|0|0|0|]
// 2/2 (1): system.thetaRef = system.omega * time [dynamic |0|0|0|0|]
// 3/3 (1): system.omega = 314.1592653589793 [dynamic |0|0|0|0|]
// 2/2 (1): system.omega = 314.1592653589793 [dynamic |0|0|0|0|]
// 3/3 (1): system.thetaRef = system.omega * time [dynamic |0|0|0|0|]
// 4/4 (1): 0.0 = -system.thetaRel [unknown |0|0|0|0|]
// 5/5 (1): system.thetaRef = system.theta [binding |0|0|0|0|]
//
Expand Down Expand Up @@ -687,8 +687,8 @@ val(fixedVoltageSource1.p[1], 1.0);
// Equations (5, 5)
// ========================================
// 1/1 (1): system.omega_internal = system.thetaRef / time [dynamic |0|0|0|0|]
// 2/2 (1): system.thetaRef = system.omega * time [dynamic |0|0|0|0|]
// 3/3 (1): system.omega = 314.1592653589793 [dynamic |0|0|0|0|]
// 2/2 (1): system.omega = 314.1592653589793 [dynamic |0|0|0|0|]
// 3/3 (1): system.thetaRef = system.omega * time [dynamic |0|0|0|0|]
// 4/4 (1): system.thetaRel = 0.0 [unknown |0|0|0|0|]
// 5/5 (1): system.theta = system.thetaRef [binding |0|0|0|0|]
//
Expand All @@ -705,17 +705,17 @@ val(fixedVoltageSource1.p[1], 1.0);
// ========================================
// 5 variables and equations
// var 1 is solved in eqn 1
// var 2 is solved in eqn 3
// var 3 is solved in eqn 2
// var 2 is solved in eqn 2
// var 3 is solved in eqn 3
// var 4 is solved in eqn 4
// var 5 is solved in eqn 5
//
//
// StrongComponents
// ========================================
// {4:4}
// {3:2}
// {2:3}
// {2:2}
// {3:3}
// {5:5}
// {1:1}
//
Expand Down

0 comments on commit 8c3a23d

Please sign in to comment.