|
From: Robert L. <rle...@us...> - 2007-03-23 11:04:23
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_types/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/supports_types/impl Modified Files: _check_Test.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_Test.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_types/impl/_check_Test.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _check_Test.cc 5 Jan 2007 14:17:27 -0000 1.3 --- _check_Test.cc 23 Mar 2007 11:03:43 -0000 1.4 *************** *** 1,4 **** /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. --- 1,4 ---- /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. *************** *** 6,11 **** * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. --- 6,11 ---- * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. *************** *** 18,21 **** --- 18,22 ---- #include <Components/ccmtools.h> + #include <TestHome_entry.h> #include <TestHome_gen.h> *************** *** 30,34 **** int error = 0; error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; --- 31,35 ---- int error = 0; error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; *************** *** 36,44 **** } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); Test::SmartPtr myTest; ! TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); --- 37,45 ---- } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); Test::SmartPtr myTest; ! TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); *************** *** 46,50 **** myTest = myTestHome->create(); myTest->configuration_complete(); ! cout << "== Begin Test Case ====================================" << endl; { --- 47,51 ---- myTest = myTestHome->create(); myTest->configuration_complete(); ! cout << "== Begin Test Case ====================================" << endl; { *************** *** 55,59 **** assert(short_3 == 3); assert(short_r == 3+7); ! long long_2=3, long_3, long_r; long_r = myTest->op_b2(7,long_2, long_3); --- 56,60 ---- assert(short_3 == 3); assert(short_r == 3+7); ! long long_2=3, long_3, long_r; long_r = myTest->op_b2(7,long_2, long_3); *************** *** 61,65 **** assert(long_3 == 3); assert(long_r == 3+7); ! unsigned short ushort_2=3, ushort_3, ushort_r; ushort_r = myTest->op_b3(7,ushort_2, ushort_3); --- 62,66 ---- assert(long_3 == 3); assert(long_r == 3+7); ! unsigned short ushort_2=3, ushort_3, ushort_r; ushort_r = myTest->op_b3(7,ushort_2, ushort_3); *************** *** 67,71 **** assert(ushort_3 == 3); assert(ushort_r == 3+7); ! unsigned long ulong_2=3, ulong_3, ulong_r; ulong_r = myTest->op_b4(7,ulong_2, ulong_3); --- 68,72 ---- assert(ushort_3 == 3); assert(ushort_r == 3+7); ! unsigned long ulong_2=3, ulong_3, ulong_r; ulong_r = myTest->op_b4(7,ulong_2, ulong_3); *************** *** 73,77 **** assert(ulong_3 == 3); assert(ulong_r == 3+7); ! float float_2=3.0, float_3, float_r; float_r = myTest->op_b5(7.0,float_2, float_3); --- 74,78 ---- assert(ulong_3 == 3); assert(ulong_r == 3+7); ! float float_2=3.0, float_3, float_r; float_r = myTest->op_b5(7.0,float_2, float_3); *************** *** 79,83 **** assert(abs(float_3 - 3.0) < 0.001); assert(abs(float_r - (3.0+7.0)) < 0.001); ! double double_2=3.0, double_3, double_r; double_r = myTest->op_b6(7.0,double_2, double_3); --- 80,84 ---- assert(abs(float_3 - 3.0) < 0.001); assert(abs(float_r - (3.0+7.0)) < 0.001); ! double double_2=3.0, double_3, double_r; double_r = myTest->op_b6(7.0,double_2, double_3); *************** *** 85,89 **** assert(abs(double_3 - 3.0) < 0.000001); assert(abs(double_r - (3.0+7.0)) < 0.000001); ! char char_2=3, char_3, char_r; char_r = myTest->op_b7(7,char_2, char_3); --- 86,90 ---- assert(abs(double_3 - 3.0) < 0.000001); assert(abs(double_r - (3.0+7.0)) < 0.000001); ! char char_2=3, char_3, char_r; char_r = myTest->op_b7(7,char_2, char_3); *************** *** 91,95 **** assert(char_3 == 3); assert(char_r == 3+7); ! string string_2="drei", string_3, string_r; string_r = myTest->op_b8("sieben",string_2, string_3); --- 92,96 ---- assert(char_3 == 3); assert(char_r == 3+7); ! string string_2="drei", string_3, string_r; string_r = myTest->op_b8("sieben",string_2, string_3); *************** *** 97,101 **** assert(string_3 == "drei"); assert(string_r == "dreisieben"); ! bool bool_2=false, bool_3, bool_r; bool_r = myTest->op_b9(true, bool_2, bool_3); --- 98,102 ---- assert(string_3 == "drei"); assert(string_r == "dreisieben"); ! bool bool_2=false, bool_3, bool_r; bool_r = myTest->op_b9(true, bool_2, bool_3); *************** *** 109,114 **** assert(uchar_3 == 3); assert(uchar_r == 3+7); ! } ! { // test case: typedef long time_t; --- 110,115 ---- assert(uchar_3 == 3); assert(uchar_r == 3+7); ! } ! { // test case: typedef long time_t; *************** *** 118,123 **** assert(time_t_3 == 3); assert(time_t_r == 3+7); ! ! // Test case: enum Color {red, green, blue, black, orange}; Color Color_2,Color_3, Color_r; Color_2 = Color(blue); --- 119,124 ---- assert(time_t_3 == 3); assert(time_t_r == 3+7); ! ! // Test case: enum Color {red, green, blue, black, orange}; Color Color_2,Color_3, Color_r; Color_2 = Color(blue); *************** *** 135,142 **** assert(Pair_2.key == "a"); assert(Pair_r.key == "ab"); ! // Test case: typedef sequence<Value> map; Map map_1, map_2, map_3, map_r; ! for(int i=0;i<5;i++) { Pair p1, p2; --- 136,143 ---- assert(Pair_2.key == "a"); assert(Pair_r.key == "ab"); ! // Test case: typedef sequence<Value> map; Map map_1, map_2, map_3, map_r; ! for(int i=0;i<5;i++) { Pair p1, p2; *************** *** 149,163 **** } map_r = myTest->op_u4(map_1,map_2,map_3); ! for(unsigned int i=0;i<map_r.size();i++) { Pair p = map_r.at(i); assert(p.value == (long)i); } ! for(unsigned int i=0;i<map_2.size();i++) { Pair p = map_2.at(i); assert(p.value == (long)i); } ! for(unsigned int i=0;i<map_3.size();i++) { Pair p = map_3.at(i); --- 150,164 ---- } map_r = myTest->op_u4(map_1,map_2,map_3); ! for(unsigned int i=0;i<map_r.size();i++) { Pair p = map_r.at(i); assert(p.value == (long)i); } ! for(unsigned int i=0;i<map_2.size();i++) { Pair p = map_2.at(i); assert(p.value == (long)i); } ! for(unsigned int i=0;i<map_3.size();i++) { Pair p = map_3.at(i); *************** *** 165,169 **** } } ! // Test interface types { --- 166,170 ---- } } ! // Test interface types { *************** *** 184,216 **** myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; return -1; } ! error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; return error; } ! cout << ">>>> Stop Test Client: " << __FILE__ << endl; } --- 185,217 ---- myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; return -1; } ! error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; return error; } ! cout << ">>>> Stop Test Client: " << __FILE__ << endl; } |