Browse Source

Proper class/function names for *Texture GL tests.

Another copypase bug.
pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
de64c2e3e4
  1. 48
      src/Magnum/Test/RectangleTextureGLTest.cpp
  2. 146
      src/Magnum/Test/TextureArrayGLTest.cpp

48
src/Magnum/Test/RectangleTextureGLTest.cpp

@ -36,9 +36,9 @@
namespace Magnum { namespace Test {
class TextureGLTest: public AbstractOpenGLTester {
class RectangleTextureGLTest: public AbstractOpenGLTester {
public:
explicit TextureGLTest();
explicit RectangleTextureGLTest();
void construct();
@ -56,25 +56,25 @@ class TextureGLTest: public AbstractOpenGLTester {
void invalidateSubImage();
};
TextureGLTest::TextureGLTest() {
addTests({&TextureGLTest::construct,
RectangleTextureGLTest::RectangleTextureGLTest() {
addTests({&RectangleTextureGLTest::construct,
&TextureGLTest::sampling,
&TextureGLTest::samplingBorderInteger,
&RectangleTextureGLTest::sampling,
&RectangleTextureGLTest::samplingBorderInteger,
&TextureGLTest::storage,
&RectangleTextureGLTest::storage,
&TextureGLTest::image,
&TextureGLTest::imageBuffer,
&RectangleTextureGLTest::image,
&RectangleTextureGLTest::imageBuffer,
&TextureGLTest::subImage,
&TextureGLTest::subImageBuffer,
&RectangleTextureGLTest::subImage,
&RectangleTextureGLTest::subImageBuffer,
&TextureGLTest::invalidateImage,
&TextureGLTest::invalidateSubImage});
&RectangleTextureGLTest::invalidateImage,
&RectangleTextureGLTest::invalidateSubImage});
}
void TextureGLTest::construct() {
void RectangleTextureGLTest::construct() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
@ -88,7 +88,7 @@ void TextureGLTest::construct() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::sampling() {
void RectangleTextureGLTest::sampling() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
@ -102,7 +102,7 @@ void TextureGLTest::sampling() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::samplingBorderInteger() {
void RectangleTextureGLTest::samplingBorderInteger() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_integer>())
CORRADE_SKIP(Extensions::GL::EXT::texture_integer::string() + std::string(" is not supported."));
@ -116,7 +116,7 @@ void TextureGLTest::samplingBorderInteger() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::storage() {
void RectangleTextureGLTest::storage() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
@ -130,7 +130,7 @@ void TextureGLTest::storage() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::image() {
void RectangleTextureGLTest::image() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
@ -154,7 +154,7 @@ void TextureGLTest::image() {
std::vector<UnsignedByte>(data, data + 16), TestSuite::Compare::Container);
}
void TextureGLTest::imageBuffer() {
void RectangleTextureGLTest::imageBuffer() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
@ -179,7 +179,7 @@ void TextureGLTest::imageBuffer() {
std::vector<UnsignedByte>(data, data+16), TestSuite::Compare::Container);
}
void TextureGLTest::subImage() {
void RectangleTextureGLTest::subImage() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
@ -210,7 +210,7 @@ void TextureGLTest::subImage() {
}), TestSuite::Compare::Container);
}
void TextureGLTest::subImageBuffer() {
void RectangleTextureGLTest::subImageBuffer() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
@ -242,7 +242,7 @@ void TextureGLTest::subImageBuffer() {
}), TestSuite::Compare::Container);
}
void TextureGLTest::invalidateImage() {
void RectangleTextureGLTest::invalidateImage() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
@ -253,7 +253,7 @@ void TextureGLTest::invalidateImage() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::invalidateSubImage() {
void RectangleTextureGLTest::invalidateSubImage() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
@ -266,4 +266,4 @@ void TextureGLTest::invalidateSubImage() {
}}
CORRADE_TEST_MAIN(Magnum::Test::TextureGLTest)
CORRADE_TEST_MAIN(Magnum::Test::RectangleTextureGLTest)

146
src/Magnum/Test/TextureArrayGLTest.cpp

@ -36,121 +36,121 @@
namespace Magnum { namespace Test {
class TextureGLTest: public AbstractOpenGLTester {
class TextureArrayGLTest: public AbstractOpenGLTester {
public:
explicit TextureGLTest();
explicit TextureArrayGLTest();
#ifndef MAGNUM_TARGET_GLES
void construct1DArray();
void construct1D();
#endif
void construct2DArray();
void construct2D();
#ifndef MAGNUM_TARGET_GLES
void sampling1DArray();
void sampling1D();
#endif
void sampling2DArray();
void sampling2D();
#ifndef MAGNUM_TARGET_GLES
void samplingBorderInteger1DArray();
void samplingBorderInteger2DArray();
void samplingBorderInteger1D();
void samplingBorderInteger2D();
#else
void samplingBorder2DArray();
void samplingBorder2D();
#endif
#ifndef MAGNUM_TARGET_GLES
void storage1DArray();
void storage1D();
#endif
void storage2DArray();
void storage2D();
#ifndef MAGNUM_TARGET_GLES
void image1DArray();
void image1DArrayBuffer();
void image1D();
void image1DBuffer();
#endif
#ifndef MAGNUM_TARGET_GLES2
void image2DArray();
void image2DArrayBuffer();
void image2D();
void image2DBuffer();
#endif
#ifndef MAGNUM_TARGET_GLES
void subImage1DArray();
void subImage1DArrayBuffer();
void subImage1D();
void subImage1DBuffer();
#endif
void subImage2DArray();
void subImage2DArrayBuffer();
void subImage2D();
void subImage2DBuffer();
#ifndef MAGNUM_TARGET_GLES
void generateMipmap1DArray();
void generateMipmap1D();
#endif
void generateMipmap2DArray();
void generateMipmap2D();
#ifndef MAGNUM_TARGET_GLES
void invalidateImage1DArray();
void invalidateImage1D();
#endif
void invalidateImage2DArray();
void invalidateImage2D();
#ifndef MAGNUM_TARGET_GLES
void invalidateSubImage1DArray();
void invalidateSubImage1D();
#endif
void invalidateSubImage2DArray();
void invalidateSubImage2D();
};
TextureGLTest::TextureGLTest() {
TextureArrayGLTest::TextureArrayGLTest() {
addTests({
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::construct1DArray,
&TextureArrayGLTest::construct1D,
#endif
&TextureGLTest::construct2DArray,
&TextureArrayGLTest::construct2D,
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::sampling1DArray,
&TextureArrayGLTest::sampling1D,
#endif
&TextureGLTest::sampling2DArray,
&TextureArrayGLTest::sampling2D,
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::samplingBorderInteger1DArray,
&TextureGLTest::samplingBorderInteger2DArray,
&TextureArrayGLTest::samplingBorderInteger1D,
&TextureArrayGLTest::samplingBorderInteger2D,
#else
&TextureGLTest::samplingBorder2DArray,
&TextureArrayGLTest::samplingBorder2D,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::storage1DArray,
&TextureArrayGLTest::storage1D,
#endif
&TextureGLTest::storage2DArray,
&TextureArrayGLTest::storage2D,
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::image1DArray,
&TextureGLTest::image1DArrayBuffer,
&TextureArrayGLTest::image1D,
&TextureArrayGLTest::image1DBuffer,
#endif
&TextureGLTest::image2DArray,
&TextureGLTest::image2DArrayBuffer,
&TextureArrayGLTest::image2D,
&TextureArrayGLTest::image2DBuffer,
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::subImage1DArray,
&TextureGLTest::subImage1DArrayBuffer,
&TextureArrayGLTest::subImage1D,
&TextureArrayGLTest::subImage1DBuffer,
#endif
&TextureGLTest::subImage2DArray,
&TextureGLTest::subImage2DArrayBuffer,
&TextureArrayGLTest::subImage2D,
&TextureArrayGLTest::subImage2DBuffer,
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::generateMipmap1DArray,
&TextureArrayGLTest::generateMipmap1D,
#endif
&TextureGLTest::generateMipmap2DArray,
&TextureArrayGLTest::generateMipmap2D,
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::invalidateImage1DArray,
&TextureArrayGLTest::invalidateImage1D,
#endif
&TextureGLTest::invalidateImage2DArray,
&TextureArrayGLTest::invalidateImage2D,
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::invalidateSubImage1DArray,
&TextureArrayGLTest::invalidateSubImage1D,
#endif
&TextureGLTest::invalidateSubImage2DArray
&TextureArrayGLTest::invalidateSubImage2D
});
}
#ifndef MAGNUM_TARGET_GLES
void TextureGLTest::construct1DArray() {
void TextureArrayGLTest::construct1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -165,7 +165,7 @@ void TextureGLTest::construct1DArray() {
}
#endif
void TextureGLTest::construct2DArray() {
void TextureArrayGLTest::construct2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -182,7 +182,7 @@ void TextureGLTest::construct2DArray() {
}
#ifndef MAGNUM_TARGET_GLES
void TextureGLTest::sampling1DArray() {
void TextureArrayGLTest::sampling1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -196,7 +196,7 @@ void TextureGLTest::sampling1DArray() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::samplingBorderInteger1DArray() {
void TextureArrayGLTest::samplingBorderInteger1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_integer>())
CORRADE_SKIP(Extensions::GL::EXT::texture_integer::string() + std::string(" is not supported."));
@ -211,7 +211,7 @@ void TextureGLTest::samplingBorderInteger1DArray() {
}
#endif
void TextureGLTest::sampling2DArray() {
void TextureArrayGLTest::sampling2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -232,7 +232,7 @@ void TextureGLTest::sampling2DArray() {
}
#ifndef MAGNUM_TARGET_GLES
void TextureGLTest::samplingBorderInteger2DArray() {
void TextureArrayGLTest::samplingBorderInteger2D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_integer>())
CORRADE_SKIP(Extensions::GL::EXT::texture_integer::string() + std::string(" is not supported."));
@ -246,7 +246,7 @@ void TextureGLTest::samplingBorderInteger2DArray() {
MAGNUM_VERIFY_NO_ERROR();
}
#else
void TextureGLTest::samplingBorder2DArray() {
void TextureArrayGLTest::samplingBorder2D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>())
CORRADE_SKIP(Extensions::GL::NV::texture_border_clamp::string() + std::string(" is not supported."));
@ -259,7 +259,7 @@ void TextureGLTest::samplingBorder2DArray() {
#endif
#ifndef MAGNUM_TARGET_GLES
void TextureGLTest::storage1DArray() {
void TextureArrayGLTest::storage1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -279,7 +279,7 @@ void TextureGLTest::storage1DArray() {
}
#endif
void TextureGLTest::storage2DArray() {
void TextureArrayGLTest::storage2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -304,7 +304,7 @@ void TextureGLTest::storage2DArray() {
}
#ifndef MAGNUM_TARGET_GLES
void TextureGLTest::image1DArray() {
void TextureArrayGLTest::image1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -328,7 +328,7 @@ void TextureGLTest::image1DArray() {
std::vector<UnsignedByte>(data, data + 16), TestSuite::Compare::Container);
}
void TextureGLTest::image1DArrayBuffer() {
void TextureArrayGLTest::image1DBuffer() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -354,7 +354,7 @@ void TextureGLTest::image1DArrayBuffer() {
}
#endif
void TextureGLTest::image2DArray() {
void TextureArrayGLTest::image2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -387,7 +387,7 @@ void TextureGLTest::image2DArray() {
#endif
}
void TextureGLTest::image2DArrayBuffer() {
void TextureArrayGLTest::image2DBuffer() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -422,7 +422,7 @@ void TextureGLTest::image2DArrayBuffer() {
}
#ifndef MAGNUM_TARGET_GLES
void TextureGLTest::subImage1DArray() {
void TextureArrayGLTest::subImage1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -453,7 +453,7 @@ void TextureGLTest::subImage1DArray() {
}), TestSuite::Compare::Container);
}
void TextureGLTest::subImage1DArrayBuffer() {
void TextureArrayGLTest::subImage1DBuffer() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -486,7 +486,7 @@ void TextureGLTest::subImage1DArrayBuffer() {
}
#endif
void TextureGLTest::subImage2DArray() {
void TextureArrayGLTest::subImage2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -541,7 +541,7 @@ void TextureGLTest::subImage2DArray() {
#endif
}
void TextureGLTest::subImage2DArrayBuffer() {
void TextureArrayGLTest::subImage2DBuffer() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -598,7 +598,7 @@ void TextureGLTest::subImage2DArrayBuffer() {
}
#ifndef MAGNUM_TARGET_GLES
void TextureGLTest::generateMipmap1DArray() {
void TextureArrayGLTest::generateMipmap1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::GL::ARB::framebuffer_object::string() + std::string(" is not supported."));
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
@ -626,7 +626,7 @@ void TextureGLTest::generateMipmap1DArray() {
}
#endif
void TextureGLTest::generateMipmap2DArray() {
void TextureArrayGLTest::generateMipmap2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::GL::ARB::framebuffer_object::string() + std::string(" is not supported."));
@ -661,7 +661,7 @@ void TextureGLTest::generateMipmap2DArray() {
}
#ifndef MAGNUM_TARGET_GLES
void TextureGLTest::invalidateImage1DArray() {
void TextureArrayGLTest::invalidateImage1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -673,7 +673,7 @@ void TextureGLTest::invalidateImage1DArray() {
}
#endif
void TextureGLTest::invalidateImage2DArray() {
void TextureArrayGLTest::invalidateImage2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -687,7 +687,7 @@ void TextureGLTest::invalidateImage2DArray() {
}
#ifndef MAGNUM_TARGET_GLES
void TextureGLTest::invalidateSubImage1DArray() {
void TextureArrayGLTest::invalidateSubImage1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -699,7 +699,7 @@ void TextureGLTest::invalidateSubImage1DArray() {
}
#endif
void TextureGLTest::invalidateSubImage2DArray() {
void TextureArrayGLTest::invalidateSubImage2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
@ -714,4 +714,4 @@ void TextureGLTest::invalidateSubImage2DArray() {
}}
CORRADE_TEST_MAIN(Magnum::Test::TextureGLTest)
CORRADE_TEST_MAIN(Magnum::Test::TextureArrayGLTest)

Loading…
Cancel
Save