From: Robert L. <rle...@us...> - 2007-03-23 11:04:23
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/attribute_types/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/attribute_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/attribute_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> *************** *** 28,32 **** int error = 0; error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; --- 29,33 ---- int error = 0; error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; *************** *** 34,48 **** } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); ! ! Test::SmartPtr myTest; TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*> ( homeFinder->find_home_by_name("TestHome").ptr())); ! myTest = myTestHome->create(); myTest->configuration_complete(); ! cout << "== Begin Test Case =============================================" << endl; --- 35,49 ---- } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); ! ! Test::SmartPtr myTest; TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*> ( homeFinder->find_home_by_name("TestHome").ptr())); ! myTest = myTestHome->create(); myTest->configuration_complete(); ! cout << "== Begin Test Case =============================================" << endl; *************** *** 52,106 **** short short_result = myTest->short_value(); assert(short_result == short_value); ! long long_value = -7777; myTest->long_value(long_value); long long_result = myTest->long_value(); assert(long_result == long_value); ! unsigned short ushort_value = 7; myTest->ushort_value(ushort_value); unsigned short ushort_result = myTest->ushort_value(); assert(ushort_result == ushort_value); ! unsigned long ulong_value = 7777; myTest->ulong_value(ulong_value); unsigned long ulong_result = myTest->ulong_value(); assert(ulong_result == ulong_value); ! float float_value = -77.77; myTest->float_value(float_value); float float_result = myTest->float_value(); assert(abs(float_result - float_value) < 0.001); ! double double_value = -77.7777; myTest->double_value(double_value); double double_result = myTest->double_value(); assert(abs(double_result - double_value) < 0.001); ! char char_value = 'x'; myTest->char_value(char_value); char char_result = myTest->char_value(); assert(char_result == char_value); ! string string_value = "0123456789"; myTest->string_value(string_value); string string_result = myTest->string_value(); assert(string_result == string_value); ! bool boolean_value = true; myTest->boolean_value(boolean_value); bool boolean_result = myTest->boolean_value(); assert(boolean_result == boolean_value); ! unsigned char octet_value = 0xff; myTest->octet_value(octet_value); unsigned char octet_result = myTest->octet_value(); assert(octet_result == octet_value); ! wchar_t wchar_value = 'x'; myTest->wchar_value(wchar_value); wchar_t wchar_result = myTest->char_value(); assert(wchar_result == wchar_value); ! wstring wstring_value = L"0123456789"; myTest->wstring_value(wstring_value); --- 53,107 ---- short short_result = myTest->short_value(); assert(short_result == short_value); ! long long_value = -7777; myTest->long_value(long_value); long long_result = myTest->long_value(); assert(long_result == long_value); ! unsigned short ushort_value = 7; myTest->ushort_value(ushort_value); unsigned short ushort_result = myTest->ushort_value(); assert(ushort_result == ushort_value); ! unsigned long ulong_value = 7777; myTest->ulong_value(ulong_value); unsigned long ulong_result = myTest->ulong_value(); assert(ulong_result == ulong_value); ! float float_value = -77.77; myTest->float_value(float_value); float float_result = myTest->float_value(); assert(abs(float_result - float_value) < 0.001); ! double double_value = -77.7777; myTest->double_value(double_value); double double_result = myTest->double_value(); assert(abs(double_result - double_value) < 0.001); ! char char_value = 'x'; myTest->char_value(char_value); char char_result = myTest->char_value(); assert(char_result == char_value); ! string string_value = "0123456789"; myTest->string_value(string_value); string string_result = myTest->string_value(); assert(string_result == string_value); ! bool boolean_value = true; myTest->boolean_value(boolean_value); bool boolean_result = myTest->boolean_value(); assert(boolean_result == boolean_value); ! unsigned char octet_value = 0xff; myTest->octet_value(octet_value); unsigned char octet_result = myTest->octet_value(); assert(octet_result == octet_value); ! wchar_t wchar_value = 'x'; myTest->wchar_value(wchar_value); wchar_t wchar_result = myTest->char_value(); assert(wchar_result == wchar_value); ! wstring wstring_value = L"0123456789"; myTest->wstring_value(wstring_value); *************** *** 116,121 **** time_t time_result = myTest->typedef_value(); assert(time_result == time_value); ! ! // Test Case for: enum Color {red, green, blue, black, orange}; Color Color_value; --- 117,122 ---- time_t time_result = myTest->typedef_value(); assert(time_result == time_value); ! ! // Test Case for: enum Color {red, green, blue, black, orange}; Color Color_value; *************** *** 124,132 **** Color Color_result = myTest->enum_value(); assert(Color_result == Color_value); ! ! // Test Case for: struct Pair { string key; double value; }; Pair struct_value; ! struct_value.key = "a"; struct_value.value = 1.0; myTest->struct_value(struct_value); --- 125,133 ---- Color Color_result = myTest->enum_value(); assert(Color_result == Color_value); ! ! // Test Case for: struct Pair { string key; double value; }; Pair struct_value; ! struct_value.key = "a"; struct_value.value = 1.0; myTest->struct_value(struct_value); *************** *** 137,141 **** // Test Case for: typedef sequence<Value> map; Map map_value; ! for(int i=0;i<5;i++) { Pair p1; --- 138,142 ---- // Test Case for: typedef sequence<Value> map; Map map_value; ! for(int i=0;i<5;i++) { Pair p1; *************** *** 146,150 **** myTest->sequence_value(map_value); Map map_result = myTest->sequence_value(); ! for(int i=0;i<(int)map_result.size();i++) { Pair p = map_result.at(i); --- 147,151 ---- myTest->sequence_value(map_value); Map map_result = myTest->sequence_value(); ! for(int i=0;i<(int)map_result.size();i++) { Pair p = map_result.at(i); *************** *** 155,175 **** 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; --- 156,176 ---- 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; *************** *** 178,182 **** error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; --- 179,183 ---- error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; |