Browse Source

TextureTools: expand DistanceField size assert tests.

pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
4feb98715e
  1. 29
      src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp

29
src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp

@ -529,7 +529,34 @@ void DistanceFieldGLTest::sizeRatioNotMultipleOfTwo() {
, Vector2i{23*14}
#endif
);
CORRADE_COMPARE(out.str(), "TextureTools::DistanceField: expected input and output size ratio to be a multiple of 2, got {322, 322} and {46, 46}\n");
/* Verify also just one axis wrong */
distanceField(input, output, {{}, {23*2, 23}}
#ifdef MAGNUM_TARGET_GLES
, Vector2i{23*14}
#endif
);
distanceField(input, output, {{}, {23, 23*2}}
#ifdef MAGNUM_TARGET_GLES
, Vector2i{23*14}
#endif
);
/* Almost correct except that it's not an integer multiply */
distanceField(input, output, {{}, {22, 23}}
#ifdef MAGNUM_TARGET_GLES
, Vector2i{23*14}
#endif
);
distanceField(input, output, {{}, {23, 22}}
#ifdef MAGNUM_TARGET_GLES
, Vector2i{23*14}
#endif
);
CORRADE_COMPARE(out.str(),
"TextureTools::DistanceField: expected input and output size ratio to be a multiple of 2, got {322, 322} and {46, 46}\n"
"TextureTools::DistanceField: expected input and output size ratio to be a multiple of 2, got {322, 322} and {46, 23}\n"
"TextureTools::DistanceField: expected input and output size ratio to be a multiple of 2, got {322, 322} and {23, 46}\n"
"TextureTools::DistanceField: expected input and output size ratio to be a multiple of 2, got {322, 322} and {22, 23}\n"
"TextureTools::DistanceField: expected input and output size ratio to be a multiple of 2, got {322, 322} and {23, 22}\n");
}
#ifndef MAGNUM_TARGET_WEBGL

Loading…
Cancel
Save