Skip to content

Commit

Permalink
Add test for --showStructuralAnnotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Jan 25, 2019
1 parent 5c577d7 commit 0082843
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions openmodelica/interactive-API/Makefile
Expand Up @@ -68,6 +68,7 @@ setComponentComment.mos \
setComponentModifierValue.mos \
setSourceFileListFile.mos \
showDoc.mos \
showStructuralAnnotations.mos \
stringSplit.mos \
strings.mos \
variables.mos \
Expand Down
52 changes: 52 additions & 0 deletions openmodelica/interactive-API/showStructuralAnnotations.mos
@@ -0,0 +1,52 @@
// name: showStructuralAnnotations
// keywords:
// status: correct
// cflags: --showStructuralAnnotations
//
// Tests the showStructuralAnnotations flag.
//

loadString("
model A
annotation(derivative = A_der);
end A;

model A_der
end A_der;

model B
annotation(Inline = true, smoothOrder = 1);
end B;

model C
annotation(NotStructural = true, LateInline = true);
end C;

model D
annotation(NotStructural = true);
end D;
");

instantiateModel(A);
instantiateModel(B);
instantiateModel(C);
instantiateModel(D);

// Result:
// true
// "class A
// annotation(derivative = A_der);
// end A;
// "
// "class B
// annotation(Inline = true, smoothOrder = 1);
// end B;
// "
// "class C
// annotation(LateInline = true);
// end C;
// "
// "class D
// end D;
// "
// endResult

0 comments on commit 0082843

Please sign in to comment.