Skip to content

Commit

Permalink
[NF] Add another when test.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Nov 9, 2018
1 parent 87201bf commit aa7e9c1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -777,6 +777,7 @@ WhenInitial1.mo \
WhenNested1.mo \
WhenNested2.mo \
WhenVariability1.mo \
WhenVariability2.mo \
Wild1.mo \
OCGTests.mos \

Expand Down
22 changes: 22 additions & 0 deletions flattening/modelica/scodeinst/WhenVariability2.mo
@@ -0,0 +1,22 @@
// name: WhenVariablity2
// keywords:
// status: incorrect
// cflags: -d=newInst
//

model WhenVariability2
Real x;
algorithm
when pre(x) > 1 then
end when;
end WhenVariability2;

// Result:
// Error processing file: WhenVariability2.mo
// [flattening/modelica/scodeinst/WhenVariability2.mo:10:3-11:11:writable] Error: Argument 1 of pre must be a discrete expression, but x is continuous.
//
// # Error encountered! Exiting...
// # Please check the error message and the flags.
//
// Execution failed!
// endResult

0 comments on commit aa7e9c1

Please sign in to comment.