|
From: <ma...@us...> - 2009-10-15 14:14:44
|
Revision: 426
http://scstudio.svn.sourceforge.net/scstudio/?rev=426&view=rev
Author: madzin
Date: 2009-10-15 14:14:36 +0000 (Thu, 15 Oct 2009)
Log Message:
-----------
Fix time07, time08
Modified Paths:
--------------
trunk/src/data/Z120/Context.cpp
Added Paths:
-----------
trunk/tests/z120_test/z120_time07.mpr.result
trunk/tests/z120_test/z120_time08.mpr.result
Modified: trunk/src/data/Z120/Context.cpp
===================================================================
--- trunk/src/data/Z120/Context.cpp 2009-10-13 17:12:25 UTC (rev 425)
+++ trunk/src/data/Z120/Context.cpp 2009-10-15 14:14:36 UTC (rev 426)
@@ -1227,6 +1227,13 @@
context->z->print_report(RS_ERROR, L"Warning 23: Time information can be defined only to a reference node\n");
return ;
}
+
+ if(context->time_first == context->time_second && context->time_first != unknown && node2 == node)
+ {
+ context->z->print_report(RS_ERROR, L"Warning 30: Time interval was defined to one point");
+ return ;
+ }
+
/* check for z120_time08.mpr */
//if(node2 == node) { std::cout << "connection points " << (context->time_first==bottom) << " " << (context->time_second==bottom) << std::endl;}
/* */
Added: trunk/tests/z120_test/z120_time07.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time07.mpr.result (rev 0)
+++ trunk/tests/z120_test/z120_time07.mpr.result 2009-10-15 14:14:36 UTC (rev 426)
@@ -0,0 +1,36 @@
+Warning 30: Time interval was defined to one point
+OK: z120_time07 is correct, should be correct
+
+mscdocument z120_time07;
+msc Main;
+initial connect L0;
+L0: connect L1, L2;
+L1: reference Subprocess connect L3;
+L2: reference Subprocess time [1,2);
+ top bottom L1 (1,10);
+ connect L1;
+L3: final;
+endmsc;
+msc Subprocess;
+inst P1;
+inst P2;
+P1: instance;
+out NAME,0 to P2;
+label e0;
+out NAME,1 to P2;
+time e1 [7];
+label e1;
+in NAME,2 from P2;
+endinstance;
+P2: instance;
+concurrent;
+label e2;
+in NAME,0 from P1 before e3;
+time e4 [12];
+label e3;
+in NAME,1 from P1;
+endconcurrent;
+label e4;
+out NAME,2 to P1;
+endinstance;
+endmsc;
Added: trunk/tests/z120_test/z120_time08.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time08.mpr.result (rev 0)
+++ trunk/tests/z120_test/z120_time08.mpr.result 2009-10-15 14:14:36 UTC (rev 426)
@@ -0,0 +1,35 @@
+OK: z120_time08 is correct, should be correct
+
+mscdocument z120_time08;
+msc Main;
+initial connect L0;
+L0: connect L1, L2;
+L1: reference Subprocess connect L3;
+L2: reference Subprocess time [1,2), [3];
+ top bottom L1 (1,10);
+ connect L1;
+L3: final;
+endmsc;
+msc Subprocess;
+inst P1;
+inst P2;
+P1: instance;
+out NAME,0 to P2;
+label e0;
+out NAME,1 to P2;
+time e1 [7];
+label e1;
+in NAME,2 from P2;
+endinstance;
+P2: instance;
+concurrent;
+label e2;
+in NAME,0 from P1 before e3;
+time e4 [12];
+label e3;
+in NAME,1 from P1;
+endconcurrent;
+label e4;
+out NAME,2 to P1;
+endinstance;
+endmsc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|