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 Jan 23, 2018
1 parent 81db93b commit 5ab0f64
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 22 deletions.
6 changes: 3 additions & 3 deletions flattening/modelica/scodeinst/ConstantConnector2.mo
Expand Up @@ -7,15 +7,15 @@
model ConstantConnector2
connector C = constant Real;

C c1, c2;
C c1 = 1, c2 = 2;
equation
connect(c1, c2);
end ConstantConnector2;

// Result:
// class ConstantConnector2
// constant Real c1;
// constant Real c2;
// constant Real c1 = 1.0;
// constant Real c2 = 2.0;
// equation
// assert(abs(c1 - c2) <= 0.0, "Connected constants/parameters must be equal");
// end ConstantConnector2;
Expand Down
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/ForStatement2.mo
Expand Up @@ -23,7 +23,7 @@ end ForStatement2;
// Real x[5];
// constant Integer s = 5;
// algorithm
// for i in 1:s loop
// for i in 1:5 loop
// x[i] := /*Real*/(i);
// end for;
// end ForStatement2;
Expand Down
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/Makefile
Expand Up @@ -424,7 +424,6 @@ NonConnectorFlow1.mo \
NonexistentRedeclareModifier1.mo \
NonexistentRedeclareModifier2.mo \
PackageConstant1.mo \
PackageConstant2.mo \
ParameterBug.mos \
PropagateExtends.mo \
RangeInvalidStep1.mo \
Expand Down Expand Up @@ -591,6 +590,7 @@ redeclare8.mo \
RedeclaredFunction1.mo \
type4.mo \
type5.mo \
PackageConstant2.mo \

# Dependency files that are not .mo .mos or Makefile
# Add them here or they will be cleaned.
Expand Down
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/const10.mo
Expand Up @@ -20,6 +20,6 @@ end C;
// Result:
// class C
// constant Integer b.j = 3;
// Real b.x = /*Real*/(b.j);
// Real b.x = 3.0;
// end C;
// endResult
6 changes: 3 additions & 3 deletions flattening/modelica/scodeinst/const11.mo
Expand Up @@ -37,11 +37,11 @@ end M;
// class M
// Integer x = 2;
// constant Integer a.j = 3;
// Integer y = a.j;
// Integer y = 3;
// constant Integer b.i = 2;
// Integer z = b.i;
// Integer z = 2;
// constant Integer j = 2;
// Integer w = j;
// Integer w = 2;
// Integer v = 2;
// end M;
// endResult
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/const12.mo
Expand Up @@ -21,6 +21,6 @@ end B;
// Result:
// class B
// constant Integer j = 2;
// Real x = /*Real*/(j);
// Real x = 2.0;
// end B;
// endResult
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/const15.mo
Expand Up @@ -18,6 +18,6 @@ end C;

// Result:
// class C
// Real x = /*Real*/(4);
// Real x = 4.0;
// end C;
// endResult
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/const16.mo
Expand Up @@ -24,6 +24,6 @@ end M;

// Result:
// class M
// Real x = /*Real*/(2);
// Real x = 2.0;
// end M;
// endResult
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/const17.mo
Expand Up @@ -23,6 +23,6 @@ end M;

// Result:
// class M
// Real x = /*Real*/(2);
// Real x = 2.0;
// end M;
// endResult
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/const4.mo
Expand Up @@ -21,6 +21,6 @@ end A;
// Real x[1];
// Real x[2];
// equation
// x = {p[1].i, p[2].i};
// x = {1.0, 2.0};
// end A;
// endResult
14 changes: 6 additions & 8 deletions flattening/modelica/scodeinst/eq4.mo
Expand Up @@ -3,8 +3,6 @@
// status: correct
// cflags: -d=newInst
//
// Equations not yet instantiated.
//

package P
constant Integer n = 3;
Expand Down Expand Up @@ -38,17 +36,17 @@ end B;
// Real a2[3].x;
// parameter Real a2[3].y = 4.0;
// equation
// a1[1].x = a1[1].y * /*Real*/(3);
// a1[1].x = a1[1].y * 3.0;
// a1[1].y = a1[1].x;
// a1[2].x = a1[2].y * /*Real*/(3);
// a1[2].x = a1[2].y * 3.0;
// a1[2].y = a1[2].x;
// a1[3].x = a1[3].y * /*Real*/(3);
// a1[3].x = a1[3].y * 3.0;
// a1[3].y = a1[3].x;
// a2[1].x = a2[1].y * /*Real*/(3);
// a2[1].x = a2[1].y * 3.0;
// a2[1].y = a2[1].x;
// a2[2].x = a2[2].y * /*Real*/(3);
// a2[2].x = a2[2].y * 3.0;
// a2[2].y = a2[2].x;
// a2[3].x = a2[3].y * /*Real*/(3);
// a2[3].x = a2[3].y * 3.0;
// a2[3].y = a2[3].x;
// end B;
// endResult

0 comments on commit 5ab0f64

Please sign in to comment.