| 97 | |
| 98 | |
| 99 | bool SampleInfoMatches(const ::DDS::SampleInfo& si1, const ::DDS::SampleInfo& si2) |
| 100 | { |
| 101 | bool match = true; |
| 102 | |
| 103 | if (si1.sample_state != si2.sample_state) |
| 104 | { |
| 105 | ACE_OS::fprintf(stderr, "sample_state is different\n"); |
| 106 | match = false; |
| 107 | } |
| 108 | |
| 109 | if (si1.view_state != si2.view_state) |
| 110 | { |
| 111 | ACE_OS::fprintf(stderr, "view_state is different\n"); |
| 112 | match = false; |
| 113 | } |
| 114 | |
| 115 | if (si1.instance_state != si2.instance_state) |
| 116 | { |
| 117 | ACE_OS::fprintf(stderr, "instance_state is different\n"); |
| 118 | match = false; |
| 119 | } |
| 120 | |
| 121 | if (si1.disposed_generation_count != si2.disposed_generation_count) |
| 122 | { |
| 123 | ACE_OS::fprintf(stderr, "disposed_generation_count is different\n"); |
| 124 | match = false; |
| 125 | } |
| 126 | |
| 127 | if (si1.no_writers_generation_count != si2.no_writers_generation_count) |
| 128 | { |
| 129 | ACE_OS::fprintf(stderr, "no_writers_generation_count is different\n"); |
| 130 | match = false; |
| 131 | } |
| 132 | |
| 133 | if (si1.sample_rank != si2.sample_rank) |
| 134 | { |
| 135 | ACE_OS::printf("sample_rank is different\n"); |
| 136 | match = false; |
| 137 | } |
| 138 | |
| 139 | if (si1.generation_rank != si2.generation_rank) |
| 140 | { |
| 141 | ACE_OS::fprintf(stderr, "generation_rank is different\n"); |
| 142 | match = false; |
| 143 | } |
| 144 | |
| 145 | if (si1.absolute_generation_rank != si2.absolute_generation_rank) |
| 146 | { |
| 147 | ACE_OS::fprintf(stderr, "generation_rank is different\n"); |
| 148 | match = false; |
| 149 | } |
| 150 | |
| 151 | if (!match) { |
| 152 | ACE_OS::fprintf(stderr, "Expected:\n"); |
| 153 | PrintSampleInfo(si2); |
| 154 | ACE_OS::fprintf(stderr, "is not the same as actual:\n"); |
| 155 | PrintSampleInfo(si1); |
| 156 | } |