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 28, 2017
1 parent 7befa22 commit 40c6cc0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions flattening/modelica/scodeinst/ExternalFunctionExplicit2.mo
@@ -0,0 +1,33 @@
// name: ExternalFunctionExplicit2
// keywords:
// status: correct
// cflags: -d=newInst
//
//

function f
input Real x[3];
output Real y;
external "C" y = ext(x, size(x, 1));
end f;

model ExternalFunctionExplicit2
Real x;
algorithm
x := f({1.0, 2.0, 3.0});
end ExternalFunctionExplicit2;

// Result:
// function f
// input Real[3] x;
// output Real y;
//
// external "C" y = ext(x, 3);
// end f;
//
// class ExternalFunctionExplicit2
// Real x;
// algorithm
// x := f({1.0, 2.0, 3.0});
// end ExternalFunctionExplicit2;
// endResult
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -178,6 +178,7 @@ ExtendsVisibility3.mo \
ExtendsVisibility4.mo \
ExtendsVisibility5.mo \
ExternalFunctionExplicit1.mo \
ExternalFunctionExplicit2.mo \
ExternalFunctionImplicit1.mo \
ExternalFunctionImplicit2.mo \
ExternalFunctionImplicit3.mo \
Expand Down

0 comments on commit 40c6cc0

Please sign in to comment.