-
Notifications
You must be signed in to change notification settings - Fork 182
Description
There are two tests in ModelicaTest.Fluid.TestComponents that have too tight asserts. One is Machines.TestLinearPower:
ModelicaStandardLibrary/ModelicaTest/Fluid/TestComponents/Machines/TestLinearPower.mo
Line 7 in b4a4b03
| assert(p >= 23 and p <= 23, "Error in linearPower"); |
which is a numerical hazard, because p is computed by a linear equation, so the actual computed value could be something like 23.000000000001 or 29.999999999999 or something like that, which would of course be OK but would trigger the assertion failure.
The other one is ModelicaTest.Fluid.TestComponents.Pipes.DynamicPipeEnergyConservationCheck2:
Lines 128 to 131 in b4a4b03
| assert(time < 500 or Modelica.Math.isEqual(total_AV_B_a, total_AV_B_b, 1), "Energy not conserved!"); | |
| assert(time < 500 or Modelica.Math.isEqual(total_A_VB_a, total_A_VB_b, 1), "Energy not conserved!"); | |
| assert(time < 500 or Modelica.Math.isEqual(total_AV_VB_a, total_AV_VB_b, 1), "Energy not conserved!"); | |
| assert(time < 500 or Modelica.Math.isEqual(total_A_V_B_a, total_A_V_B_b, 1), "Energy not conserved!"); |
where it is not clear whether the second part of the assertions will ever be checked, since
Line 148 in b4a4b03
| annotation (experiment(StopTime=500), |