| 112 | } |
| 113 | |
| 114 | void TestSetColor() |
| 115 | { |
| 116 | mitk::Label::Pointer label = mitk::Label::New(); |
| 117 | mitk::Color currentColor = label->GetColor(); |
| 118 | mitk::Color colorToBeCompared; |
| 119 | colorToBeCompared.Set(1., 1., 1.); |
| 120 | CPPUNIT_ASSERT_MESSAGE("Initial label has wrong color", currentColor.GetBlue() == colorToBeCompared.GetBlue()); |
| 121 | CPPUNIT_ASSERT_MESSAGE("Initial label has wrong color", currentColor.GetGreen() == colorToBeCompared.GetGreen()); |
| 122 | CPPUNIT_ASSERT_MESSAGE("Initial label has wrong color", currentColor.GetRed() == colorToBeCompared.GetRed()); |
| 123 | |
| 124 | colorToBeCompared.Set(0.4f, 0.3f, 1.0f); |
| 125 | label->SetColor(colorToBeCompared); |
| 126 | currentColor = label->GetColor(); |
| 127 | CPPUNIT_ASSERT_MESSAGE("Initial label has wrong color", currentColor.GetBlue() == colorToBeCompared.GetBlue()); |
| 128 | CPPUNIT_ASSERT_MESSAGE("Initial label has wrong color", currentColor.GetGreen() == colorToBeCompared.GetGreen()); |
| 129 | CPPUNIT_ASSERT_MESSAGE("Initial label has wrong color", currentColor.GetRed() == colorToBeCompared.GetRed()); |
| 130 | } |
| 131 | |
| 132 | void TestSetValue() |
| 133 | { |