Skip to content

Commit

Permalink
Add test for ticket:4112
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed Jan 25, 2017
1 parent 5957971 commit c427c9c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions simulation/modelica/algorithms_functions/Makefile
Expand Up @@ -31,6 +31,7 @@ LocalVariableInit.mos \
ModelicaTest.Fluid.Dissipation.Verifications.HeatTransfer.Channel.kc_evenGapLaminar.mos \
SimplePeriodicSampler.mos \
SumSeriesWhile.mos \
TestCrossFunction.mos \
ticket-3477.mos \
TupleReturn.mos \
val.mos \
Expand Down
30 changes: 30 additions & 0 deletions simulation/modelica/algorithms_functions/TestCrossFunction.mos
@@ -0,0 +1,30 @@
// status: correct

loadModel(Modelica);getErrorString();
loadString("model TestCrossFunction
import Modelica.Mechanics.MultiBody.Frames;
Frames.Orientation R = Frames.nullRotation();
Real v1[3], v2[3];

function f
input Frames.Orientation R;
input Real v1[3];
output Real v2[3];
algorithm
v2 := Frames.resolveRelative(cross(Frames.angularVelocity2(R), v1), R, R);
end f;

equation
v1 = {0, 0, 0};
v2 = f(R, v1);
end TestCrossFunction;");getErrorString();
buildModel(TestCrossFunction);getErrorString();

// Result:
// true
// ""
// true
// ""
// {"TestCrossFunction","TestCrossFunction_init.xml"}
// ""
// endResult

0 comments on commit c427c9c

Please sign in to comment.