| 101 | |
| 102 | template <class T> |
| 103 | void TestPropAssignment(T prop, T prop2, const std::string &strProp) |
| 104 | { |
| 105 | unsigned long tag = prop->AddObserver(itk::ModifiedEvent(), m_L.m_Cmd.GetPointer()); |
| 106 | |
| 107 | mitk::BaseProperty::Pointer baseProp2(prop2.GetPointer()); |
| 108 | *prop = *baseProp2; |
| 109 | CPPUNIT_ASSERT_MESSAGE("Test modified event", m_L.Pop()); |
| 110 | std::string msg = std::string("Test assignment [") + prop->GetValueAsString() + " == " + strProp + "]"; |
| 111 | CPPUNIT_ASSERT_MESSAGE(msg, prop->GetValueAsString() == strProp); |
| 112 | CPPUNIT_ASSERT_MESSAGE("Test equality", *prop == *prop2); |
| 113 | CPPUNIT_ASSERT_MESSAGE("Test equality", *prop == *baseProp2); |
| 114 | CPPUNIT_ASSERT_MESSAGE("Test polymorphic equality", *baseProp2 == *prop); |
| 115 | |
| 116 | prop->RemoveObserver(tag); |
| 117 | } |
| 118 | |
| 119 | template <class T> |
| 120 | void TestPropPolymorphicAssignment(T prop, T prop2, const std::string &strProp) |
nothing calls this directly
no test coverage detected