Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 3365762

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
translateModelFMU returns empty string on failure
This makes it possible to script the result of translateModelFMU, to compare the result with empty string (or the expected string).
1 parent c0326c3 commit 3365762

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Compiler/Script/CevalScriptBackend.mo

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,11 +1317,17 @@ algorithm
13171317
(cache,ret_val,st_1) := buildModelFMU(cache, env, className, st, str1, str2, filenameprefix, true);
13181318
then (cache,ret_val,st_1);
13191319

1320+
case (cache,env,"translateModelFMU", _,st,_)
1321+
then (cache,Values.STRING(""),st);
1322+
13201323
case (cache,env,"buildModelFMU", Values.CODE(Absyn.C_TYPENAME(className))::Values.STRING(str1)::Values.STRING(str2)::Values.STRING(filenameprefix)::Values.ARRAY(valueLst=cvars)::_,st,_)
13211324
algorithm
13221325
(cache,ret_val,st_1) := buildModelFMU(cache, env, className, st, str1, str2, filenameprefix, true, list(ValuesUtil.extractValueString(vv) for vv in cvars));
13231326
then (cache,ret_val,st_1);
13241327

1328+
case (cache,env,"buildModelFMU", _,st,_)
1329+
then (cache,Values.STRING(""),st);
1330+
13251331
case (cache,env,"translateModelXML",{Values.CODE(Absyn.C_TYPENAME(className)),Values.STRING(filenameprefix)},st,_)
13261332
equation
13271333
filenameprefix = Util.stringReplaceChar(filenameprefix,".","_");

0 commit comments

Comments
 (0)