Skip to content

Commit

Permalink
Add test for #3653
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Feb 12, 2016
1 parent 45c776f commit cb540a9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions metamodelica/meta/Makefile
Expand Up @@ -101,6 +101,7 @@ ReturnInTryBlock.mos \
Shadowing1.mos \
Shadowing2.mos \
Simplify1.mos \
StringBoxed.mos \
SwitchString.mos \
TailRecursion.mo \
TailRecursionNoretcall.mos \
Expand Down
25 changes: 25 additions & 0 deletions metamodelica/meta/StringBoxed.mos
@@ -0,0 +1,25 @@
// status: correct
// Based on ticket #3653

setCommandLineOptions("-g=MetaModelica");getErrorString();
loadString("function stringRealTest
input list<String> args;
output Boolean res;
protected
list<Real> r_arr;
list<String> s_arr;
algorithm
r_arr := list(stringReal(s) for s in args);
s_arr := list(String(r) for r in r_arr);
res := min(s1==s2 threaded for s1 in args, s2 in s_arr);
end stringRealTest;");getErrorString();
stringRealTest({"1","2","3","4","5","6","7","8"});getErrorString();

// Result:
// true
// ""
// true
// ""
// true
// ""
// endResult

0 comments on commit cb540a9

Please sign in to comment.