diff options
author | msmit <msmit@remedy.nl> | 2012-11-23 10:29:38 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2012-11-23 10:29:38 +0000 |
commit | 679ac950dabc09ef411c32c7fa974aaf3aae3801 (patch) | |
tree | f74f9f468876b7b0fa973fcefc27b607c731eba4 | |
parent | b2ee927d559a0573c98cf95157194d7bf69c8da2 (diff) | |
download | ATCD-679ac950dabc09ef411c32c7fa974aaf3aae3801.tar.gz |
Fri Nov 23 10:28:23 UTC 2012 Marcel Smit <msmit@remedy.nl>
* tests/Bug_3769_Regression/Foo.idl:
* tests/Bug_3769_Regression/Foo_exec.h:
* tests/Bug_3769_Regression/Foo_exec.cpp:
Expanded test. Added a struct within a struct which
is placed in a separate module. checking whether the
correct values are set.
-rw-r--r-- | CIAO/ChangeLog | 9 | ||||
-rw-r--r-- | CIAO/tests/Bug_3769_Regression/Foo.idl | 26 | ||||
-rw-r--r-- | CIAO/tests/Bug_3769_Regression/Foo_exec.cpp | 40 | ||||
-rw-r--r-- | CIAO/tests/Bug_3769_Regression/Foo_exec.h | 8 |
4 files changed, 80 insertions, 3 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index d82a580792e..627d1f237d9 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,12 @@ +Fri Nov 23 10:28:23 UTC 2012 Marcel Smit <msmit@remedy.nl> + + * tests/Bug_3769_Regression/Foo.idl: + * tests/Bug_3769_Regression/Foo_exec.h: + * tests/Bug_3769_Regression/Foo_exec.cpp: + Expanded test. Added a struct within a struct which + is placed in a separate module. checking whether the + correct values are set. + Mon Nov 19 18:15:16 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> * connectors/dds4ccm/impl/DataReaderListener_T.cpp: diff --git a/CIAO/tests/Bug_3769_Regression/Foo.idl b/CIAO/tests/Bug_3769_Regression/Foo.idl index f3eb1856985..dd4e9658e7a 100644 --- a/CIAO/tests/Bug_3769_Regression/Foo.idl +++ b/CIAO/tests/Bug_3769_Regression/Foo.idl @@ -61,6 +61,31 @@ interface FooSupport attribute short supported_short; }; +module StructModule +{ + typedef unsigned long long Seconds; + typedef unsigned long NanoSecs; + + struct Time + { + Seconds sec; + NanoSecs nanosec; + }; + + enum EndTime + { + DLT_NONE, + DLT_SOFT, + DLT_HARD + }; + + struct StructStruct + { + Time struct_time; + EndTime type; + }; +}; + component Foo supports FooSupport { attribute short my_short; @@ -86,6 +111,7 @@ component Foo supports FooSupport attribute Baz my_baz_struct; attribute Data my_data_union; attribute Data2 my_var_data_union; + attribute StructModule::StructStruct my_struct_struct; }; #endif /* FOO_IDL_ */ diff --git a/CIAO/tests/Bug_3769_Regression/Foo_exec.cpp b/CIAO/tests/Bug_3769_Regression/Foo_exec.cpp index e9776398808..301d53dc378 100644 --- a/CIAO/tests/Bug_3769_Regression/Foo_exec.cpp +++ b/CIAO/tests/Bug_3769_Regression/Foo_exec.cpp @@ -24,7 +24,8 @@ namespace CIAO_Foo_Impl my_string_sequence_ (false), my_fixed_string_ (false), my_variable_string_ (false), - supported_short_ (false) + supported_short_ (false), + my_struct_struct_ (false) { } @@ -522,6 +523,40 @@ namespace CIAO_Foo_Impl { } + StructModule::StructStruct Foo_exec_i::my_struct_struct (void) + { + return StructModule::StructStruct (); + } + + void Foo_exec_i::my_struct_struct (const StructModule::StructStruct & my_struct_struct) + { + bool error_found = false; + + if (my_struct_struct.type != StructModule::DLT_HARD) + { + ACE_ERROR ((LM_ERROR, "ERROR: my_struct_struct.deadline_type != 2, it is %d\n", + my_struct_struct.type)); + error_found = true; + } + + if (my_struct_struct.struct_time.sec != 15) + { + ACE_ERROR ((LM_ERROR, "ERROR: my_struct_struct.struct_time.sec != 15, it is %d\n", + my_struct_struct.struct_time.sec)); + error_found = true; + } + + if (my_struct_struct.struct_time.sec != 15) + { + ACE_ERROR ((LM_ERROR, "ERROR: my_struct_struct.struct_time.nanosec != 20, it is %d\n", + my_struct_struct.struct_time.nanosec)); + error_found = true; + } + + my_struct_struct_ = !error_found; + } + + // Operations from Components::SessionComponent. void @@ -559,7 +594,8 @@ namespace CIAO_Foo_Impl my_string_sequence_ && my_fixed_string_ && my_variable_string_ && - supported_short_)) + supported_short_ && + my_struct_struct_)) { ACE_ERROR ((LM_ERROR, "ERROR: Not all expected attributes were initialized\n")); } diff --git a/CIAO/tests/Bug_3769_Regression/Foo_exec.h b/CIAO/tests/Bug_3769_Regression/Foo_exec.h index 0b3bf4dccd9..a7040cc9099 100644 --- a/CIAO/tests/Bug_3769_Regression/Foo_exec.h +++ b/CIAO/tests/Bug_3769_Regression/Foo_exec.h @@ -196,6 +196,11 @@ namespace CIAO_Foo_Impl virtual ::string_array_slice *my_string_array (void); virtual void my_string_array (const ::string_array my_string_array); + + virtual StructModule::StructStruct my_struct_struct (void); + + virtual void my_struct_struct (const StructModule::StructStruct & my_struct_struct); + //@} //@{ @@ -231,7 +236,8 @@ namespace CIAO_Foo_Impl my_string_sequence_, my_fixed_string_, my_variable_string_, - supported_short_; + supported_short_, + my_struct_struct_; }; |