Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NF] Add conditional component binding tests.
Belonging to [master]: - OpenModelica/OMCompiler#2741 - OpenModelica/OpenModelica-testsuite#1062
- Loading branch information
1 parent
993f292
commit 3f57500
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// name: ConditionInvalidBinding1 | ||
// keywords: | ||
// status: incorrect | ||
// cflags: -d=newInst | ||
// | ||
|
||
model ConditionInvalidBinding1 | ||
Real x = "string" if true; | ||
end ConditionInvalidBinding1; | ||
|
||
// Result: | ||
// Error processing file: ConditionInvalidBinding1.mo | ||
// [flattening/modelica/scodeinst/ConditionInvalidBinding1.mo:8:3-8:28:writable] Error: Type mismatch in binding x = "string", expected subtype of Real, got type String. | ||
// | ||
// # Error encountered! Exiting... | ||
// # Please check the error message and the flags. | ||
// | ||
// Execution failed! | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// name: ConditionInvalidBinding2 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model ConditionInvalidBinding2 | ||
Real x = "string" if false; | ||
end ConditionInvalidBinding2; | ||
|
||
// Result: | ||
// class ConditionInvalidBinding2 | ||
// end ConditionInvalidBinding2; | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters