Skip to content

Commit

Permalink
[NF] Add more when tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Mar 28, 2019
1 parent f193e07 commit 0184306
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -825,6 +825,7 @@ WhenClocked1.mo \
WhenClockedElse1.mo \
WhenClockedElse2.mo \
WhenClockedStatement1.mo \
WhenClockedTupleCall1.mo \
WhenIllegalContext1.mo \
WhenIllegalContext2.mo \
WhenIllegalContext3.mo \
Expand Down
29 changes: 29 additions & 0 deletions flattening/modelica/scodeinst/WhenClockedTupleCall1.mo
@@ -0,0 +1,29 @@
// name: WhenClockedTupleCall1
// keywords:
// status: correct
// cflags: -d=newInst
//

function f
output Real x = 1;
output Real y = 2;
end f;

model WhenClockedTupleCall1
Real x, y;
equation
when Clock() then
(x, y) = f();
end when;
end WhenClockedTupleCall1;

// Result:
// class WhenClockedTupleCall1
// Real x;
// Real y;
// equation
// when Clock() then
// (x, y) = (1.0, 2.0);
// end when;
// end WhenClockedTupleCall1;
// endResult

0 comments on commit 0184306

Please sign in to comment.