|
From: <ma...@us...> - 2011-02-28 17:35:39
|
Revision: 1053
http://scstudio.svn.sourceforge.net/scstudio/?rev=1053&view=rev
Author: madzin
Date: 2011-02-28 17:35:32 +0000 (Mon, 28 Feb 2011)
Log Message:
-----------
Solve message crossing and fix some bugs about it. Add new tests
Modified Paths:
--------------
trunk/src/membership/diff_impl.cpp
trunk/src/membership/diff_impl.h
trunk/tests/diff/CMakeLists.txt
trunk/tests/diff/flow04_2.mpr.result
Added Paths:
-----------
trunk/tests/diff/flow01.mpr.result
trunk/tests/diff/flow04_4.mpr.result
trunk/tests/diff/flow04_5.mpr
trunk/tests/diff/flow04_5.mpr.result
trunk/tests/diff/flow04_6.mpr
trunk/tests/diff/flow04_6.mpr.result
trunk/tests/diff/flow06_2.mpr
trunk/tests/diff/flow06_2.mpr.result
trunk/tests/diff/flow07_1.mpr
trunk/tests/diff/flow07_1.mpr.result
trunk/tests/diff/flow07_2.mpr
trunk/tests/diff/flow07_2.mpr.result
Modified: trunk/src/membership/diff_impl.cpp
===================================================================
--- trunk/src/membership/diff_impl.cpp 2011-02-27 17:46:37 UTC (rev 1052)
+++ trunk/src/membership/diff_impl.cpp 2011-02-28 17:35:32 UTC (rev 1053)
@@ -19,29 +19,9 @@
void process_diffrences(MembershipContext* c, BMscPtr dup_flow, const std::map<std::wstring, Difference*>& diff_map);
bool check_attributes(MembershipContext* c, BMscPtr specification, BMscPtr dup_flow);
+bool check_matching_event_creation(std::map<std::wstring, std::list<Difference*> > insert_map, Difference* diff);
+std::map<std::wstring, std::list<Difference*> > create_insert_map(const std::map<std::wstring, Difference*>& diff_map);
-void print_result(Difference* diff)
-{
- while(diff != NULL)
- {
- if(diff->getOperation() == ADD) std::cerr << "ADD" << std::endl;
- else std::cerr << "REMOVE" << std::endl;
- std::cerr << "line1: " << diff->getLine1() << " ";
-
- if(diff->getLocation() == NULL) std::cerr << "NULL";
- else std::wcout << diff->getLocation()->get_message()->get_label();
-
- std::cerr << std::endl;
-
-
- std::cerr << "line2: " << diff->getLine2() << " ";
- std::wcout << diff->getMessage()->get_label() << std::endl;
-
- diff = diff->getPrevious();
- }
- std::cerr << "===============================" << std::endl;
-}
-
void print_result(BMscPtr msc)
{
InstancePtrList insts = msc->get_instances();
@@ -85,7 +65,6 @@
*/
MscPtr MembershipAlg::diff(MscPtr specification, std::vector<MscPtr>& msc_flows)
{
- //TODO redirect the output messages
if(msc_flows.size() > 1)
print_report(RS_WARNING, L"Warning: in this version, it is supported for one flow, others is ignored");
@@ -275,6 +254,10 @@
for (int i = 0; i < row-1; i++)
{
location = location->get_successor();
+
+//TODO check this
+ if(location->get_marked() == REMOVED)
+ i--;
}
if(row <= 0)
location = NULL;
@@ -374,28 +357,87 @@
InstancePtrList::iterator spec_it;
InstancePtrList::iterator flow_it;
+
+ std::set<std::wstring> all_instances;
+ std::set<std::wstring>::iterator all_inst_it;
- bool found = false;
+ for(spec_it = spec_inst.begin(); spec_it != spec_inst.end(); spec_it++)
+ {
+ all_inst_it = all_instances.find((*spec_it)->get_label());
+
+ if(all_inst_it == all_instances.end())
+ all_instances.insert((*spec_it)->get_label());
+ }
- for (spec_it = spec_inst.begin(); spec_it != spec_inst.end(); spec_it++)
+ for (flow_it = flow_inst.begin(); flow_it != flow_inst.end(); flow_it++)
{
- found = false;
+ all_inst_it = all_instances.find((*flow_it)->get_label());
+ if(all_inst_it == all_instances.end())
+ all_instances.insert((*flow_it)->get_label());
+ }
+
+ bool flow_found = false;
+ bool spec_found = false;
+
+ for(all_inst_it = all_instances.begin(); all_inst_it != all_instances.end(); all_inst_it++)
+ {
+ spec_found = false;
+ flow_found = false;
+
+ //spec_it is pointing to the specification instance which has the proper name
+ for(spec_it = spec_inst.begin(); spec_it != spec_inst.end(); spec_it++)
+ {
+ if((*spec_it)->get_label() == *all_inst_it)
+ {
+ spec_found = true;
+ break;
+ }
+ }
+
+ //flow_it is pointing to the flow instance which has the proper name
for (flow_it = flow_inst.begin(); flow_it != flow_inst.end(); flow_it++)
{
- if ((*spec_it)->get_label() == (*flow_it)->get_label())
+ if((*flow_it)->get_label() == *all_inst_it)
{
- Difference* diff = instance_diff(c, *flow_it, *spec_it);
+ flow_found = true;
+ break;
+ }
+ }
- if(diff != NULL)
- diff_map.insert(std::make_pair((*flow_it)->get_label(), diff));
+ //when some instance of the flow is not comntained in the specification
+ if(!spec_found)
+ {
+ StrictOrderAreaPtr s_e_a = boost::dynamic_pointer_cast<StrictOrderArea> ((*flow_it)->get_first());
+ StrictEventPtr s_e = s_e_a==NULL ? NULL : s_e_a->get_first();
+ Difference* old_diff = NULL;
- found = true;
+ while(s_e != NULL)
+ {
+ Difference* diff = new Difference();
+
+ diff->setPrevious(old_diff);
+ diff->setOperation(REMOVE);
+ diff->setLocation(s_e);
+ diff->setMessage(s_e->get_message(), s_e->is_send());
+
+ old_diff = diff;
+
+ s_e = s_e->get_successor();
+
+ if(s_e == NULL)
+ {
+ s_e_a = boost::dynamic_pointer_cast<StrictOrderArea> (s_e_a->get_next());
+ s_e = s_e_a==NULL ? NULL : s_e_a->get_first();
+ }
}
+
+ if(old_diff != NULL)
+ diff_map.insert(std::make_pair(*all_inst_it, old_diff));
}
-
+
//when some instance of the specification is not contained in the flow
- if(!found)
+ if(!flow_found)
{
StrictOrderAreaPtr s_e_a = boost::dynamic_pointer_cast<StrictOrderArea> ((*spec_it)->get_first());
StrictEventPtr s_e = s_e_a==NULL ? NULL : s_e_a->get_first();
@@ -422,8 +464,17 @@
}
if (old_diff != NULL)
- diff_map.insert(std::make_pair((*spec_it)->get_label(), old_diff));
+ diff_map.insert(std::make_pair(*all_inst_it, old_diff));
}
+
+ if(!spec_found || !flow_found)
+ continue;
+
+ //when the instance of proper name was found in both MSCs (specification, flow)
+ Difference* diff = instance_diff(c, *flow_it, *spec_it);
+
+ if(diff != NULL)
+ diff_map.insert(std::make_pair((*flow_it)->get_label(), diff));
}
if(!diff_map.empty())
@@ -675,34 +726,9 @@
void process_diffrences(MembershipContext* c, BMscPtr dup_flow, const std::map<std::wstring, Difference*>& diff_map)
{
- std::map<std::wstring, Difference*>::const_iterator it;
std::map<std::wstring, std::list<Difference*> > insert_map;
- Difference* diff;
+ insert_map = create_insert_map(diff_map);
- for (it = diff_map.begin(); it != diff_map.end(); it++)
- {
- std::list<Difference*> insert_list;
- diff = it->second;
-
- if (diff == NULL)
- continue;
-
- while (diff != NULL)
- {
- if (diff->getOperation() == REMOVE)
- {
- diff->getLocation()->set_marked(REMOVED);
- diff->getLocation()->get_message()->set_marked(REMOVED);
- }
- else
- insert_list.push_back(diff);
-
- diff = diff->getPrevious();
- }
-
- insert_map.insert(std::make_pair(it->first, insert_list));
- }
-
std::map<std::wstring, std::list<Difference*> >::iterator ins_map_it;
std::map<std::wstring, std::set<Unmatched*> > unmatched_map;
std::map<std::wstring, std::set<Unmatched*> >::iterator unmatched_map_it;
@@ -725,6 +751,8 @@
continue;
}
+
+ //checks whether exists events which is supposed to be connected with instance
unmatched_map_it = unmatched_map.find(ins_map_it->first);
//create new record in unmatched_map
@@ -737,12 +765,21 @@
else
match_inst = com_msg->get_sender()->get_label();
- //create new event and add it as unmatched
- StrictEventPtr new_e = create_event(dup_flow, *ins_list_it, ins_map_it->first);
- Unmatched* unmatched = new Unmatched(new_e, message);
+ //check the matching instance, whether has a diffrence for creation of the matching event
+ //if the diffrence exist, create unmatched record
+ Unmatched* unmatched;
+ if(check_matching_event_creation(insert_map, *ins_list_it))
+ {
+ StrictEventPtr new_e = create_event(dup_flow, *ins_list_it, ins_map_it->first);
+ unmatched = new Unmatched(new_e, message);
+ }
+ else
+ continue;
+
std::map<std::wstring, std::set<Unmatched*> >::iterator match_it = unmatched_map.find(match_inst);
+ //add to unmatched
if(match_it == unmatched_map.end())
{
std::set<Unmatched*> unmatched_set;
@@ -763,23 +800,24 @@
if(com_msg == (*unmatched_set_it)->getMessage())
{
StrictEventPtr new_e = create_event(dup_flow, *ins_list_it, ins_map_it->first);
+ StrictEventPtr match_e = (*unmatched_set_it)->getEvent();
CompleteMessagePtr new_msg = new CompleteMessage(com_msg->get_label());
new_msg->set_marked(ADDED);
if((*ins_list_it)->getDirection() == SEND)
- new_msg->glue_events(new_e, (*unmatched_set_it)->getEvent());
+ new_msg->glue_events(new_e, match_e);
else
- new_msg->glue_events((*unmatched_set_it)->getEvent(), new_e);
+ new_msg->glue_events(match_e, new_e);
if(new_e->is_send())
{
set_identification(c, new_e.get(), com_msg->get_send_event());
- set_identification(c, (*unmatched_set_it)->getEvent().get(), com_msg->get_receive_event());
+ set_identification(c, match_e.get(), com_msg->get_receive_event());
}
else
{
- set_identification(c, (*unmatched_set_it)->getEvent().get(), com_msg->get_send_event());
+ set_identification(c, match_e.get(), com_msg->get_send_event());
set_identification(c, new_e.get(), com_msg->get_receive_event());
}
@@ -802,21 +840,40 @@
else
match_inst = com_msg->get_sender()->get_label();
- StrictEventPtr new_e = create_event(dup_flow, *ins_list_it, ins_map_it->first);
- Unmatched* unmatched = new Unmatched(new_e, message);
- unmatched_map_it->second.insert(unmatched);
+ Unmatched* unmatched;
+
+ if(check_matching_event_creation(insert_map, *ins_list_it))
+ {
+ StrictEventPtr new_e = create_event(dup_flow, *ins_list_it, ins_map_it->first);
+ unmatched = new Unmatched(new_e, message);
+ }
+ else
+ continue;
+
+ std::map<std::wstring, std::set<Unmatched*> >::iterator match_it = unmatched_map.find(match_inst);
+
+ if(match_it == unmatched_map.end())
+ {
+ std::set<Unmatched*> match_inst_unmatched_set;
+ match_inst_unmatched_set.insert(unmatched);
+ unmatched_map.insert(std::make_pair(match_inst, match_inst_unmatched_set));
+ }
+ else
+ match_it->second.insert(unmatched);
}
}
}
-
//check unmatched diffrences in unmatched map
for (unmatched_map_it = unmatched_map.begin(); unmatched_map_it != unmatched_map.end(); unmatched_map_it++)
{
std::set<Unmatched*> unmatched_set = unmatched_map_it->second;
+ std::set<Unmatched*>::iterator unmatched_set_it;
if(!unmatched_set.empty())
- std::wcerr << L"Warning: diff was not successfull" << std::endl;
+ throw std::runtime_error("Error: unexpected behaviour");
+
+ unmatched_set.clear();
}
}
@@ -833,6 +890,7 @@
c->set_diff_type(ATTRIBUTE);
+ //TODO prerobit ako pri prvej kontrole all_instances
for(spec_it = spec_insts.begin(); spec_it != spec_insts.end(); spec_it++)
{
for(flow_it = flow_insts.begin(); flow_it != flow_insts.end(); flow_it++)
@@ -929,7 +987,6 @@
if(match_se == NULL)
throw std::runtime_error("Error: unexpected behaviour");
- //TODO skontrolovat ci sa eventu nastavi instancia a area atd.
StrictEventPtr new_match_e = new StrictEvent();
//TODO set position
new_match_e->set_area(match_se->get_area());
@@ -975,3 +1032,76 @@
return compare_events_attribute(c, event_a.get(), event_b.get());
}
}
+
+bool check_matching_event_creation(std::map<std::wstring, std::list<Difference*> > insert_map, Difference* diff)
+{
+ std::wstring match_inst_name;
+
+ CompleteMessagePtr complete = boost::dynamic_pointer_cast<CompleteMessage>(diff->getMessage());
+
+ if(complete == NULL)
+ throw std::runtime_error("Error: unexpected behaviour");
+
+ if(diff->getDirection() == SEND)
+ match_inst_name = complete->get_receiver()->get_label();
+ else
+ match_inst_name = complete->get_sender()->get_label();
+
+ std::map<std::wstring, std::list<Difference*> >::iterator it;
+ it = insert_map.find(match_inst_name);
+
+ if(it != insert_map.end())
+ {
+ std::list<Difference*> insert_list = it->second;
+ std::list<Difference*>::iterator insert_list_it;
+
+ for(insert_list_it = insert_list.begin(); insert_list_it != insert_list.end(); insert_list_it++)
+ {
+ if((*insert_list_it)->getMessage() == diff->getMessage())
+ return true;
+ }
+ }
+
+ return false;
+}
+
+std::map<std::wstring, std::list<Difference*> > create_insert_map(const std::map<std::wstring, Difference*>& diff_map)
+{
+ std::map<std::wstring, Difference*>::const_iterator it;
+ std::map<std::wstring, std::list<Difference*> > insert_map;
+ Difference* diff;
+
+ for (it = diff_map.begin(); it != diff_map.end(); it++)
+ {
+ std::list<Difference*> insert_list;
+ diff = it->second;
+
+ if (diff == NULL)
+ continue;
+
+ while (diff != NULL)
+ {
+ if (diff->getOperation() == REMOVE)
+ {
+ if(diff->getLocation()->is_send())
+ {
+ diff->getLocation()->set_marked(REMOVED);
+ EventPtr match_e = diff->getLocation()->get_matching_event();
+
+ if(match_e != NULL)
+ match_e->set_marked(REMOVED);
+
+ diff->getLocation()->get_message()->set_marked(REMOVED);
+ }
+ }
+ else
+ insert_list.push_back(diff);
+
+ diff = diff->getPrevious();
+ }
+
+ insert_map.insert(std::make_pair(it->first, insert_list));
+ }
+
+ return insert_map;
+}
Modified: trunk/src/membership/diff_impl.h
===================================================================
--- trunk/src/membership/diff_impl.h 2011-02-27 17:46:37 UTC (rev 1052)
+++ trunk/src/membership/diff_impl.h 2011-02-28 17:35:32 UTC (rev 1053)
@@ -23,6 +23,10 @@
enum Operation {ADD, REMOVE};
enum Direction {SEND, RECEIVE};
+class Distance;
+class Unmatched;
+class Difference;
+
class Distance
{
private:
@@ -74,7 +78,7 @@
{
return event;
}
-
+
MscMessagePtr getMessage()
{
return original_message;
Modified: trunk/tests/diff/CMakeLists.txt
===================================================================
--- trunk/tests/diff/CMakeLists.txt 2011-02-27 17:46:37 UTC (rev 1052)
+++ trunk/tests/diff/CMakeLists.txt 2011-02-28 17:35:32 UTC (rev 1053)
@@ -27,7 +27,12 @@
ADD_DIFF_TEST(spec04.mpr flow04_2.mpr 1)
ADD_DIFF_TEST(spec04.mpr flow04_3.mpr 1)
ADD_DIFF_TEST(spec04.mpr flow04_4.mpr 1)
+ADD_DIFF_TEST(spec04.mpr flow04_5.mpr 1)
+ADD_DIFF_TEST(spec04.mpr flow04_6.mpr 1)
ADD_DIFF_TEST(spec05.mpr flow05_1.mpr 1)
ADD_DIFF_TEST(spec05.mpr flow05_2.mpr 1)
ADD_DIFF_TEST(spec06.mpr flow06_1.mpr 1)
+ADD_DIFF_TEST(spec06.mpr flow06_2.mpr 1)
+ADD_DIFF_TEST(spec07.mpr flow07_1.mpr 1)
+ADD_DIFF_TEST(spec07.mpr flow07_2.mpr 1)
Added: trunk/tests/diff/flow01.mpr.result
===================================================================
--- trunk/tests/diff/flow01.mpr.result (rev 0)
+++ trunk/tests/diff/flow01.mpr.result 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,64 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst A;
+inst B;
+inst C;
+A: instance;
+/* REMOVED */
+/* REMOVED */
+out a,0 to B;
+/* ADDED */
+/* ADDED */
+out a,1 to B;
+/* REMOVED */
+/* REMOVED */
+out b,2 to B;
+/* REMOVED */
+/* REMOVED */
+out c,3 to B;
+/* ADDED */
+/* ADDED */
+out d,4 to B;
+endinstance;
+B: instance;
+/* REMOVED */
+/* REMOVED */
+in a,0 from A;
+/* REMOVED */
+/* REMOVED */
+in b,2 from A;
+/* REMOVED */
+/* REMOVED */
+in c,3 from A;
+in a,5 from C;
+/* REMOVED */
+/* REMOVED */
+in d,6 from C;
+/* ADDED */
+/* ADDED */
+in b,7 from C;
+/* ADDED */
+/* ADDED */
+in c,8 from C;
+/* ADDED */
+/* ADDED */
+in a,1 from A;
+/* ADDED */
+/* ADDED */
+in d,4 from A;
+endinstance;
+C: instance;
+out a,5 to B;
+/* REMOVED */
+/* REMOVED */
+out d,6 to B;
+/* ADDED */
+/* ADDED */
+out b,7 to B;
+/* ADDED */
+/* ADDED */
+out c,8 to B;
+endinstance;
+endmsc;
Modified: trunk/tests/diff/flow04_2.mpr.result
===================================================================
--- trunk/tests/diff/flow04_2.mpr.result 2011-02-27 17:46:37 UTC (rev 1052)
+++ trunk/tests/diff/flow04_2.mpr.result 2011-02-28 17:35:32 UTC (rev 1053)
@@ -25,6 +25,7 @@
endinstance;
NAME: instance;
/* REMOVED */
+/* REMOVED */
out b,4 to A;
endinstance;
endmsc;
Added: trunk/tests/diff/flow04_4.mpr.result
===================================================================
--- trunk/tests/diff/flow04_4.mpr.result (rev 0)
+++ trunk/tests/diff/flow04_4.mpr.result 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,28 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst B;
+inst C;
+inst A;
+B: instance;
+out b,0 to A;
+in a,1 from C;
+out a,2 to C;
+/* REMOVED */
+/* REMOVED */
+out b,3 to A;
+endinstance;
+C: instance;
+out a,1 to B;
+in a,2 from B;
+in c,4 from A;
+endinstance;
+A: instance;
+out c,4 to C;
+/* REMOVED */
+/* REMOVED */
+in b,3 from B;
+in b,0 from B;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow04_5.mpr
===================================================================
--- trunk/tests/diff/flow04_5.mpr (rev 0)
+++ trunk/tests/diff/flow04_5.mpr 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,24 @@
+mscdocument flow04_4.vsd;
+msc Page_1;
+inst B;
+inst C;
+inst A;
+B: instance;
+out b,0 to A;
+in a,1 from C;
+out a,2 to C;
+in a,10 from A;
+out b,3 to A;
+endinstance;
+C: instance;
+out a,1 to B;
+in a,2 from B;
+in c,4 from A;
+endinstance;
+A: instance;
+out c,4 to C;
+in b,3 from B;
+out a,10 to B;
+in b,0 from B;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow04_5.mpr.result
===================================================================
--- trunk/tests/diff/flow04_5.mpr.result (rev 0)
+++ trunk/tests/diff/flow04_5.mpr.result 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,34 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst B;
+inst C;
+inst A;
+B: instance;
+out b,0 to A;
+in a,1 from C;
+out a,2 to C;
+/* REMOVED */
+/* REMOVED */
+in a,3 from A;
+/* REMOVED */
+/* REMOVED */
+out b,4 to A;
+endinstance;
+C: instance;
+out a,1 to B;
+in a,2 from B;
+in c,5 from A;
+endinstance;
+A: instance;
+out c,5 to C;
+/* REMOVED */
+/* REMOVED */
+in b,4 from B;
+/* REMOVED */
+/* REMOVED */
+out a,3 to B;
+in b,0 from B;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow04_6.mpr
===================================================================
--- trunk/tests/diff/flow04_6.mpr (rev 0)
+++ trunk/tests/diff/flow04_6.mpr 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,25 @@
+mscdocument flow04_2.vsd;
+msc Page_1;
+inst B;
+inst C;
+inst A;
+inst NAME;
+B: instance;
+out b,0 to A;
+in a,1 from C;
+out a,2 to C;
+endinstance;
+C: instance;
+out a,1 to B;
+in a,2 from B;
+in c,3 from A;
+endinstance;
+A: instance;
+out c,3 to C;
+in b,0 from B;
+out b,4 to NAME;
+endinstance;
+NAME: instance;
+in b,4 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow04_6.mpr.result
===================================================================
--- trunk/tests/diff/flow04_6.mpr.result (rev 0)
+++ trunk/tests/diff/flow04_6.mpr.result 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,31 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst B;
+inst C;
+inst A;
+inst NAME;
+B: instance;
+out b,0 to A;
+in a,1 from C;
+out a,2 to C;
+endinstance;
+C: instance;
+out a,1 to B;
+in a,2 from B;
+in c,3 from A;
+endinstance;
+A: instance;
+out c,3 to C;
+in b,0 from B;
+/* REMOVED */
+/* REMOVED */
+out b,4 to NAME;
+endinstance;
+NAME: instance;
+/* REMOVED */
+/* REMOVED */
+in b,4 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow06_2.mpr
===================================================================
--- trunk/tests/diff/flow06_2.mpr (rev 0)
+++ trunk/tests/diff/flow06_2.mpr 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,13 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,0 to B;
+out a,3 to B;
+endinstance;
+B: instance;
+in a,0 from A;
+in a,3 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow06_2.mpr.result
===================================================================
--- trunk/tests/diff/flow06_2.mpr.result (rev 0)
+++ trunk/tests/diff/flow06_2.mpr.result 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,25 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+/* REMOVED */
+/* REMOVED */
+out a,0 to B;
+/* ADDED */
+/* ADDED */
+out a,1 to B;
+out a,2 to B;
+endinstance;
+B: instance;
+/* REMOVED */
+/* REMOVED */
+in a,0 from A;
+in a,2 from A;
+/* ADDED */
+/* ADDED */
+in a,1 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow07_1.mpr
===================================================================
--- trunk/tests/diff/flow07_1.mpr (rev 0)
+++ trunk/tests/diff/flow07_1.mpr 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,13 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,3 to B;
+out a,0 to B;
+endinstance;
+B: instance;
+in a,0 from A;
+in a,3 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow07_1.mpr.result
===================================================================
--- trunk/tests/diff/flow07_1.mpr.result (rev 0)
+++ trunk/tests/diff/flow07_1.mpr.result 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,19 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,0 to B;
+/* REMOVED */
+/* REMOVED */
+out a,1 to B;
+endinstance;
+B: instance;
+/* REMOVED */
+/* REMOVED */
+in a,1 from A;
+in a,0 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow07_2.mpr
===================================================================
--- trunk/tests/diff/flow07_2.mpr (rev 0)
+++ trunk/tests/diff/flow07_2.mpr 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,13 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,0 to B;
+out a,3 to B;
+endinstance;
+B: instance;
+in a,0 from A;
+in a,3 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow07_2.mpr.result
===================================================================
--- trunk/tests/diff/flow07_2.mpr.result (rev 0)
+++ trunk/tests/diff/flow07_2.mpr.result 2011-02-28 17:35:32 UTC (rev 1053)
@@ -0,0 +1,19 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,0 to B;
+/* REMOVED */
+/* REMOVED */
+out a,1 to B;
+endinstance;
+B: instance;
+in a,0 from A;
+/* REMOVED */
+/* REMOVED */
+in a,1 from A;
+endinstance;
+endmsc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|