Skip to content

Commit

Permalink
Testcase for #3658
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Feb 8, 2016
1 parent 72c174a commit 26a4f65
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
35 changes: 35 additions & 0 deletions openmodelica/diff/AddComment.mos
@@ -0,0 +1,35 @@
// status: correct

echo(false);
s1 := "model AddComment
Real r;
end AddComment;";

s2 := "model AddComment
// Linköping
Real r;
end AddComment;";

answer := "model AddComment
// Linköping
Real r;
end AddComment;";

res := diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.plain);
if answer<>res then
print("\nFailed \n");
print("\nStart model:\n\n" + s1 + "\n");
print("\nSecond model:\n\n" + s2 + "\n");
print("\nDiff:\n\n" + diffModelicaFileListings(s1, s2) + "\n");
print(getErrorString());
writeFile("AddComment.res", res);
writeFile("AddComment.expected", answer);
print("Wrote to files AddComment.res and AddComment.expected\n");
exit(1);
end if;
print(getErrorString());
print("OK\n");

// Result:
// OK
// endResult
1 change: 1 addition & 0 deletions openmodelica/diff/Makefile
Expand Up @@ -3,6 +3,7 @@ TEST = ../../rtest

TESTFILES = \
AddClassAnnotation1.mos \
AddComment.mos \
AddComponent.mos \
AddComponent2.mos \
AddDeleteComponent.mos \
Expand Down

0 comments on commit 26a4f65

Please sign in to comment.