color.cpp 416 B

12345678910111213141516171819202122
  1. #include "testUtils.h"
  2. using namespace irr;
  3. using namespace video;
  4. bool rounding()
  5. {
  6. SColorf colf(0.003922f, 0.007843f, 0.011765f); // test-values by virion which once failed
  7. SColor col = colf.toSColor();
  8. return col.getRed() == 1 && col.getGreen() == 2 && col.getBlue() == 3;
  9. }
  10. //! Test SColor and SColorf
  11. bool color(void)
  12. {
  13. bool ok = true;
  14. ok &= rounding();
  15. return ok;
  16. }