Skip to content

Commit 80c7fc0

Browse files
committed
Add messages for the compliance suite
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17397 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 61808c2 commit 80c7fc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Examples/ComplianceSuite.mos

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ deleteClass(ModelicaCompliance.Classes.Enumeration.EnumDuplicateLiteral); getErr
3939
deleteClass(ModelicaCompliance.Scoping.NameLookup.Imports.QualifiedImportConflict); getErrorString();
4040
deleteClass(ModelicaCompliance.Redeclare.ClassExtends.ClassExtendsNonReplaceable); getErrorString();
4141

42-
rec:=simulate("+OpenModelica.Scripting.typeNameString(cl)+");getErrorString();
42+
rec:=simulate("+OpenModelica.Scripting.typeNameString(cl)+");err:=getErrorString();
4343
loadString(\"
4444
function length input String str; output Integer len; external \\\"C\\\" len=ModelicaStrings_length(str); end length;
4545
function substring input String str; input Integer i1,i2; output String out; external \\\"C\\\" out=ModelicaStrings_substring(str,i1,i2); end substring;
@@ -53,6 +53,7 @@ end fixName;
5353
\");
5454
resultFile := rec.resultFile;
5555
messages := rec.messages;
56+
messages := messages + err;
5657
messages := OpenModelica.Scripting.escapeXML(firstPart(messages));
5758
success := resultFile "+(if OpenModelica.Scripting.getBooleanClassAnnotation(cl,__ModelicaAssociation.TestCase.shouldPass) then"<>"else"==")+" \"\";
5859
writeFile(\""+fixName(typeNameString(cl))+".res\",\"<testcase name=\\\""+fixName(last(OpenModelica.Scripting.typeNameStrings(cl)))+"\\\">\"+(if not success then \"<error type=\\\""+(if OpenModelica.Scripting.getBooleanClassAnnotation(cl,__ModelicaAssociation.TestCase.shouldPass) then "expected failure" else "failed")+"\\\" message=\\\"\"+messages+\"\\\"/>\" else \"\")+\"</testcase>\");

0 commit comments

Comments
 (0)