MCPcopy Create free account
hub / github.com/MITK/MITK / testSetColor

Method testSetColor

Modules/Core/test/mitkMaterialTest.cpp:130–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 // MITK_TEST_CONDITION( name.compare(myMP->GetName(),0,9), "Testing if a Name object was set correctly" )
129 }
130 void testSetColor()
131 {
132 mitk::Material::Color color;
133 color.Set(0, 0, 0);
134 myMP = mitk::Material::New();
135 myMP->SetColor(color);
136 MITK_TEST_CONDITION_REQUIRED(myMP.IsNotNull(), "Testing instantiation")
137 MITK_TEST_CONDITION(ColorEqual(color, myMP->GetColor()), "Testing if a color was set correctly")
138 color.Set(0, 0, 0);
139 myMP->SetColor(color);
140 MITK_TEST_CONDITION(ColorEqual(color, myMP->GetColor()), "Testing if a color was set correctly")
141 }
142
143 void testSetColorCoefficient()
144 {

Callers 1

mitkMaterialTestFunction · 0.80

Calls 6

ColorEqualFunction · 0.85
IsNotNullMethod · 0.80
NewFunction · 0.50
SetMethod · 0.45
SetColorMethod · 0.45
GetColorMethod · 0.45

Tested by

no test coverage detected