| 94 | |
| 95 | template<typename T, typename T2> |
| 96 | bool check(const T& lhs, const T& rhs, const char* name, ACE_Message_Block* amb, Value::Type type, |
| 97 | const MetaStruct& ms, T2 Value::* ptrmbr, Encoding::Kind e) |
| 98 | { |
| 99 | if (!checkVal(lhs, rhs, name)) return false; |
| 100 | |
| 101 | Message_Block_Ptr mb(amb->duplicate()); |
| 102 | const Encoding encoding(e); |
| 103 | Serializer ser(mb.get(), encoding); |
| 104 | Value val = ms.getValue(ser, name); |
| 105 | if (val.type_ == type) { |
| 106 | std::string ser_name = std::string("Serialized ") + name; |
| 107 | if (!checkVal(T2(enumToString(rhs)), val.*ptrmbr, ser_name.c_str())) return false; |
| 108 | } else { |
| 109 | std::cout << "ERROR: Serialized type of " << name |
| 110 | << " does not match. expected " << type |
| 111 | << " received " << val.type_ << std::endl; |
| 112 | return false; |
| 113 | } |
| 114 | return true; |
| 115 | } |
| 116 | |
| 117 | template<size_t N, size_t M> |
| 118 | void fill_2d(short (&arr)[N][M]) |
no test coverage detected