Skip to content

Commit

Permalink
Update nfinst tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Nov 7, 2017
1 parent 9a9ebb6 commit 1bb9816
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
27 changes: 27 additions & 0 deletions flattening/modelica/scodeinst/IfEquation1.mo
@@ -0,0 +1,27 @@
// name: IfEquation1
// keywords:
// status: correct
// cflags: -d=newInst
//

model IfEquation1
Real x;
equation
if time > 1 then
x = 1.0;
else
x = 2.0;
end if;
end IfEquation1;

// Result:
// class IfEquation1
// Real x;
// equation
// if time > 1.0 then
// x = 2.0;
// else
// x = 1.0;
// end if;
// end IfEquation1;
// endResult
29 changes: 29 additions & 0 deletions flattening/modelica/scodeinst/IfEquation2.mo
@@ -0,0 +1,29 @@
// name: IfEquation2
// keywords:
// status: correct
// cflags: -d=newInst
//

model IfEquation2
Real x;
parameter Boolean b;
equation
if b then
x = 1.0;
else
x = 2.0;
end if;
end IfEquation2;

// Result:
// class IfEquation2
// Real x;
// parameter Boolean b;
// equation
// if b then
// x = 2.0;
// else
// x = 1.0;
// end if;
// end IfEquation2;
// endResult
2 changes: 2 additions & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -224,6 +224,8 @@ FunctionMultiOutput2.mo \
FunctionMultiOutput3.mo \
FunctionNoOutput1.mo \
FunctionStreamPrefix.mo \
IfEquation1.mo \
IfEquation2.mo \
IfEquationInvalidCond1.mo \
ih1.mo \
ih2.mo \
Expand Down

0 comments on commit 1bb9816

Please sign in to comment.