-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
_ Moved 4 template file tests from testsuite/mytest to ../template an…
…d removed testsuite/mytest from testsuite git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13068 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
- Loading branch information
Alachew Mengist
committed
Sep 27, 2012
1 parent
44fcd09
commit 0ba10f1
Showing
4 changed files
with
84 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,18 @@ | ||
// name: <XXX> | ||
// keywords: <insert keywords here> | ||
// status: correct | ||
// | ||
// <insert description here> | ||
// | ||
loadFile("<XXX>.mo"); | ||
simulate(<XXX>,numberOfIntervals=2); // 2 intervals == 3 values | ||
getErrorString(); // simulation failed, check error string. | ||
// Result: | ||
// true | ||
// record SimulationResult | ||
// resultFile = "Simulation failed." | ||
// end SimulationResult; | ||
//"#Error, too few equations. Underdetermined system | ||
// The model has 3 variables and 2 equations | ||
// " | ||
// 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,38 @@ | ||
// name: <XXX> | ||
// keywords: <insert keywords here> | ||
// status: correct | ||
// | ||
// <insert description here> | ||
// | ||
loadFile("<XXX>.mo"); | ||
simulate(<XXX>,numberOfIntervals=2); // 2 intervals == 3 values | ||
echo(false); // turns of output | ||
|
||
res:=readSimulationResult("<XXX>_res.plt",{x,y,z},3); | ||
x:=res[1]; | ||
y:=res[2]; | ||
z:=res[3]; | ||
x:=1000*x; | ||
y:=1000*y; | ||
z:=1000*z; | ||
x:=floor(x); | ||
y:=floor(y); | ||
z:=floor(z); | ||
echo(true); // turns on output | ||
x/1000.0; // rounded value to 3 digits | ||
y/1000.0; | ||
z/1000.0; | ||
readFile("output.log"); // Check that output log is emtpy | ||
system("rm -rf <XXX>.* <XXX>_* output.log"); // remove tmp files. | ||
// Result: | ||
// true | ||
// record SimulationResult | ||
// resultFile = "LinSys_res.plt" | ||
// end SimulationResult; | ||
// true | ||
// {1.0,1.654,2.169,2.62,3.032,3.418} | ||
// {2.0,2.0,2.0,2.0,2.0,2.0} | ||
// {3.0,2.545,2.23,1.979,1.767,1.581} | ||
// "" | ||
// 0 | ||
// 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,11 @@ | ||
// name: <XXX> | ||
// keywords: <insert keywords here> | ||
// status: incorrect | ||
// | ||
// <insert description here> | ||
// | ||
|
||
model <XXX> | ||
Integer x=1.0; // Illegal, translation should fail. | ||
end <XXX>; | ||
|
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,17 @@ | ||
// name: <XXX> | ||
// keywords: <insert keywords here> | ||
// status: correct | ||
// | ||
// <insert description here> | ||
// | ||
|
||
model <XXX> | ||
Real x; | ||
end <XXX>; | ||
|
||
// insert expected flat file here. Can be done by issuing the command | ||
// ./omc XXX.mo >> XXX.mo and then comment the inserted class. | ||
// | ||
// class <XXX> | ||
// Real x; | ||
// end <XXX>; |