Browse Source

GL: move noncopyability tests to non-GL test executables.

pull/255/head
Vladimír Vondruš 8 years ago
parent
commit
f47d591244
  1. 7
      src/Magnum/GL/Test/AbstractQueryGLTest.cpp
  2. 7
      src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp
  3. 14
      src/Magnum/GL/Test/AbstractShaderProgramTest.cpp
  4. 7
      src/Magnum/GL/Test/AbstractTextureGLTest.cpp
  5. 7
      src/Magnum/GL/Test/BufferGLTest.cpp
  6. 14
      src/Magnum/GL/Test/BufferImageGLTest.cpp
  7. 18
      src/Magnum/GL/Test/BufferImageTest.cpp
  8. 7
      src/Magnum/GL/Test/BufferTest.cpp
  9. 9
      src/Magnum/GL/Test/BufferTextureTest.cpp
  10. 14
      src/Magnum/GL/Test/ContextGLTest.cpp
  11. 14
      src/Magnum/GL/Test/ContextTest.cpp
  12. 9
      src/Magnum/GL/Test/CubeMapTextureArrayTest.cpp
  13. 9
      src/Magnum/GL/Test/CubeMapTextureTest.cpp
  14. 7
      src/Magnum/GL/Test/FramebufferGLTest.cpp
  15. 7
      src/Magnum/GL/Test/FramebufferTest.cpp
  16. 7
      src/Magnum/GL/Test/MeshGLTest.cpp
  17. 10
      src/Magnum/GL/Test/MeshTest.cpp
  18. 18
      src/Magnum/GL/Test/MultisampleTextureTest.cpp
  19. 9
      src/Magnum/GL/Test/PrimitiveQueryTest.cpp
  20. 9
      src/Magnum/GL/Test/RectangleTextureTest.cpp
  21. 7
      src/Magnum/GL/Test/RenderbufferGLTest.cpp
  22. 9
      src/Magnum/GL/Test/RenderbufferTest.cpp
  23. 9
      src/Magnum/GL/Test/SampleQueryTest.cpp
  24. 7
      src/Magnum/GL/Test/ShaderGLTest.cpp
  25. 9
      src/Magnum/GL/Test/ShaderTest.cpp
  26. 24
      src/Magnum/GL/Test/TextureArrayTest.cpp
  27. 37
      src/Magnum/GL/Test/TextureTest.cpp
  28. 9
      src/Magnum/GL/Test/TimeQueryTest.cpp
  29. 7
      src/Magnum/GL/Test/TransformFeedbackGLTest.cpp
  30. 9
      src/Magnum/GL/Test/TransformFeedbackTest.cpp

7
src/Magnum/GL/Test/AbstractQueryGLTest.cpp

@ -34,7 +34,6 @@ struct AbstractQueryGLTest: OpenGLTester {
explicit AbstractQueryGLTest();
void construct();
void constructCopy();
void constructMove();
#ifndef MAGNUM_TARGET_WEBGL
@ -44,7 +43,6 @@ struct AbstractQueryGLTest: OpenGLTester {
AbstractQueryGLTest::AbstractQueryGLTest() {
addTests({&AbstractQueryGLTest::construct,
&AbstractQueryGLTest::constructCopy,
&AbstractQueryGLTest::constructMove,
#ifndef MAGNUM_TARGET_WEBGL
@ -73,11 +71,6 @@ void AbstractQueryGLTest::construct() {
MAGNUM_VERIFY_NO_GL_ERROR();
}
void AbstractQueryGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<SampleQuery, const SampleQuery&>{}));
CORRADE_VERIFY(!(std::is_assignable<SampleQuery, const SampleQuery&>{}));
}
void AbstractQueryGLTest::constructMove() {
#ifdef MAGNUM_TARGET_GLES2
if(!Context::current().isExtensionSupported<Extensions::EXT::occlusion_query_boolean>())

7
src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp

@ -49,7 +49,6 @@ struct AbstractShaderProgramGLTest: OpenGLTester {
explicit AbstractShaderProgramGLTest();
void construct();
void constructCopy();
void constructMove();
#ifndef MAGNUM_TARGET_WEBGL
@ -79,7 +78,6 @@ struct AbstractShaderProgramGLTest: OpenGLTester {
AbstractShaderProgramGLTest::AbstractShaderProgramGLTest() {
addTests({&AbstractShaderProgramGLTest::construct,
&AbstractShaderProgramGLTest::constructCopy,
&AbstractShaderProgramGLTest::constructMove,
#ifndef MAGNUM_TARGET_WEBGL
@ -126,11 +124,6 @@ void AbstractShaderProgramGLTest::construct() {
MAGNUM_VERIFY_NO_GL_ERROR();
}
void AbstractShaderProgramGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<DummyShader, const DummyShader&>{}));
CORRADE_VERIFY(!(std::is_assignable<DummyShader, const DummyShader&>{}));
}
void AbstractShaderProgramGLTest::constructMove() {
DummyShader a;
const Int id = a.id();

14
src/Magnum/GL/Test/AbstractShaderProgramTest.cpp

@ -33,10 +33,12 @@ struct AbstractShaderProgramTest: TestSuite::Tester {
explicit AbstractShaderProgramTest();
void constructNoCreate();
void constructCopy();
};
AbstractShaderProgramTest::AbstractShaderProgramTest() {
addTests({&AbstractShaderProgramTest::constructNoCreate});
addTests({&AbstractShaderProgramTest::constructNoCreate,
&AbstractShaderProgramTest::constructCopy});
}
void AbstractShaderProgramTest::constructNoCreate() {
@ -55,6 +57,16 @@ void AbstractShaderProgramTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void AbstractShaderProgramTest::constructCopy() {
class DummyShader: public AbstractShaderProgram {
public:
explicit DummyShader() {}
};
CORRADE_VERIFY(!(std::is_constructible<DummyShader, const DummyShader&>{}));
CORRADE_VERIFY(!(std::is_assignable<DummyShader, const DummyShader&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::AbstractShaderProgramTest)

7
src/Magnum/GL/Test/AbstractTextureGLTest.cpp

@ -34,7 +34,6 @@ struct AbstractTextureGLTest: OpenGLTester {
explicit AbstractTextureGLTest();
void construct();
void constructCopy();
void constructMove();
#ifndef MAGNUM_TARGET_WEBGL
@ -44,7 +43,6 @@ struct AbstractTextureGLTest: OpenGLTester {
AbstractTextureGLTest::AbstractTextureGLTest() {
addTests({&AbstractTextureGLTest::construct,
&AbstractTextureGLTest::constructCopy,
&AbstractTextureGLTest::constructMove,
#ifndef MAGNUM_TARGET_WEBGL
@ -64,11 +62,6 @@ void AbstractTextureGLTest::construct() {
MAGNUM_VERIFY_NO_GL_ERROR();
}
void AbstractTextureGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Texture2D, const Texture2D&>{}));
CORRADE_VERIFY(!(std::is_assignable<Texture2D, const Texture2D&>{}));
}
void AbstractTextureGLTest::constructMove() {
Texture2D a;
const Int id = a.id();

7
src/Magnum/GL/Test/BufferGLTest.cpp

@ -39,7 +39,6 @@ struct BufferGLTest: OpenGLTester {
explicit BufferGLTest();
void construct();
void constructCopy();
void constructMove();
void wrap();
@ -66,7 +65,6 @@ struct BufferGLTest: OpenGLTester {
BufferGLTest::BufferGLTest() {
addTests({&BufferGLTest::construct,
&BufferGLTest::constructCopy,
&BufferGLTest::constructMove,
&BufferGLTest::wrap,
@ -104,11 +102,6 @@ void BufferGLTest::construct() {
MAGNUM_VERIFY_NO_GL_ERROR();
}
void BufferGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Buffer, const Buffer&>{}));
CORRADE_VERIFY(!(std::is_assignable<Buffer, const Buffer&>{}));
}
void BufferGLTest::constructMove() {
Buffer a;
const Int id = a.id();

14
src/Magnum/GL/Test/BufferImageGLTest.cpp

@ -49,8 +49,6 @@ struct BufferImageGLTest: OpenGLTester {
void constructInvalidSize();
void constructCompressedInvalidSize();
void constructCopy();
void constructCopyCompressed();
void constructMove();
void constructMoveCompressed();
@ -79,8 +77,6 @@ BufferImageGLTest::BufferImageGLTest() {
&BufferImageGLTest::constructInvalidSize,
&BufferImageGLTest::constructCompressedInvalidSize,
&BufferImageGLTest::constructCopy,
&BufferImageGLTest::constructCopyCompressed,
&BufferImageGLTest::constructMove,
&BufferImageGLTest::constructMoveCompressed,
@ -356,16 +352,6 @@ void BufferImageGLTest::constructCompressedInvalidSize() {
}
}
void BufferImageGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<BufferImage2D, const BufferImage2D&>{}));
CORRADE_VERIFY(!(std::is_assignable<BufferImage2D, const BufferImage2D&>{}));
}
void BufferImageGLTest::constructCopyCompressed() {
CORRADE_VERIFY(!(std::is_constructible<CompressedBufferImage2D, const CompressedBufferImage2D&>{}));
CORRADE_VERIFY(!(std::is_assignable<CompressedBufferImage2D, const CompressedBufferImage2D&>{}));
}
void BufferImageGLTest::constructMove() {
const char data[4] = { 'a', 'b', 'c', 'd' };
BufferImage2D a{PixelFormat::Red, PixelType::UnsignedByte, {4, 1}, data, BufferUsage::StaticDraw};

18
src/Magnum/GL/Test/BufferImageTest.cpp

@ -34,11 +34,17 @@ struct BufferImageTest: TestSuite::Tester {
void constructNoCreate();
void constructNoCreateCompressed();
void constructCopy();
void constructCopyCompressed();
};
BufferImageTest::BufferImageTest() {
addTests({&BufferImageTest::constructNoCreate,
&BufferImageTest::constructNoCreateCompressed});
&BufferImageTest::constructNoCreateCompressed,
&BufferImageTest::constructCopy,
&BufferImageTest::constructCopyCompressed});
}
void BufferImageTest::constructNoCreate() {
@ -59,6 +65,16 @@ void BufferImageTest::constructNoCreateCompressed() {
CORRADE_VERIFY(true);
}
void BufferImageTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<BufferImage2D, const BufferImage2D&>{}));
CORRADE_VERIFY(!(std::is_assignable<BufferImage2D, const BufferImage2D&>{}));
}
void BufferImageTest::constructCopyCompressed() {
CORRADE_VERIFY(!(std::is_constructible<CompressedBufferImage2D, const CompressedBufferImage2D&>{}));
CORRADE_VERIFY(!(std::is_assignable<CompressedBufferImage2D, const CompressedBufferImage2D&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::BufferImageTest)

7
src/Magnum/GL/Test/BufferTest.cpp

@ -35,6 +35,7 @@ struct BufferTest: TestSuite::Tester {
explicit BufferTest();
void constructNoCreate();
void constructCopy();
void debugTargetHint();
#ifndef MAGNUM_TARGET_GLES2
@ -44,6 +45,7 @@ struct BufferTest: TestSuite::Tester {
BufferTest::BufferTest() {
addTests({&BufferTest::constructNoCreate,
&BufferTest::constructCopy,
&BufferTest::debugTargetHint,
#ifndef MAGNUM_TARGET_GLES2
@ -61,6 +63,11 @@ void BufferTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void BufferTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Buffer, const Buffer&>{}));
CORRADE_VERIFY(!(std::is_assignable<Buffer, const Buffer&>{}));
}
void BufferTest::debugTargetHint() {
std::ostringstream out;
Debug{&out} << Buffer::TargetHint::Array << Buffer::TargetHint(0xdead);

9
src/Magnum/GL/Test/BufferTextureTest.cpp

@ -33,10 +33,12 @@ struct BufferTextureTest: TestSuite::Tester {
explicit BufferTextureTest();
void constructNoCreate();
void constructCopy();
};
BufferTextureTest::BufferTextureTest() {
addTests({&BufferTextureTest::constructNoCreate});
addTests({&BufferTextureTest::constructNoCreate,
&BufferTextureTest::constructCopy});
}
void BufferTextureTest::constructNoCreate() {
@ -48,6 +50,11 @@ void BufferTextureTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void BufferTextureTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<BufferTexture, const BufferTexture&>{}));
CORRADE_VERIFY(!(std::is_assignable<BufferTexture, const BufferTexture&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::BufferTextureTest)

14
src/Magnum/GL/Test/ContextGLTest.cpp

@ -34,8 +34,6 @@ namespace Magnum { namespace GL { namespace Test {
struct ContextGLTest: OpenGLTester {
explicit ContextGLTest();
void constructCopyMove();
void isVersionSupported();
#ifndef MAGNUM_TARGET_GLES
void isVersionSupportedES();
@ -46,9 +44,7 @@ struct ContextGLTest: OpenGLTester {
};
ContextGLTest::ContextGLTest() {
addTests({&ContextGLTest::constructCopyMove,
&ContextGLTest::isVersionSupported,
addTests({&ContextGLTest::isVersionSupported,
#ifndef MAGNUM_TARGET_GLES
&ContextGLTest::isVersionSupportedES,
#endif
@ -57,14 +53,6 @@ ContextGLTest::ContextGLTest() {
&ContextGLTest::isExtensionDisabled});
}
void ContextGLTest::constructCopyMove() {
/* Only move-construction allowed */
CORRADE_VERIFY(!(std::is_constructible<Context, const Context&>{}));
CORRADE_VERIFY((std::is_constructible<Context, Context&&>{}));
CORRADE_VERIFY(!(std::is_assignable<Context, const Context&>{}));
CORRADE_VERIFY(!(std::is_assignable<Context, Context&&>{}));
}
void ContextGLTest::isVersionSupported() {
const Version v = Context::current().version();
CORRADE_VERIFY(Context::current().isVersionSupported(v));

14
src/Magnum/GL/Test/ContextTest.cpp

@ -34,6 +34,8 @@ namespace Magnum { namespace GL { namespace Test {
struct ContextTest: TestSuite::Tester {
explicit ContextTest();
void constructCopyMove();
void extensions();
void debugFlag();
@ -44,7 +46,9 @@ struct ContextTest: TestSuite::Tester {
};
ContextTest::ContextTest() {
addTests({&ContextTest::extensions,
addTests({&ContextTest::constructCopyMove,
&ContextTest::extensions,
&ContextTest::debugFlag,
&ContextTest::debugFlags,
@ -53,6 +57,14 @@ ContextTest::ContextTest() {
&ContextTest::debugDetectedDrivers});
}
void ContextTest::constructCopyMove() {
/* Only move-construction allowed */
CORRADE_VERIFY(!(std::is_constructible<Context, const Context&>{}));
CORRADE_VERIFY((std::is_constructible<Context, Context&&>{}));
CORRADE_VERIFY(!(std::is_assignable<Context, const Context&>{}));
CORRADE_VERIFY(!(std::is_assignable<Context, Context&&>{}));
}
void ContextTest::extensions() {
const char* used[GL::Implementation::ExtensionCount]{};

9
src/Magnum/GL/Test/CubeMapTextureArrayTest.cpp

@ -33,10 +33,12 @@ struct CubeMapTextureArrayTest: TestSuite::Tester {
explicit CubeMapTextureArrayTest();
void constructNoCreate();
void constructCopy();
};
CubeMapTextureArrayTest::CubeMapTextureArrayTest() {
addTests({&CubeMapTextureArrayTest::constructNoCreate});
addTests({&CubeMapTextureArrayTest::constructNoCreate,
&CubeMapTextureArrayTest::constructCopy});
}
void CubeMapTextureArrayTest::constructNoCreate() {
@ -48,6 +50,11 @@ void CubeMapTextureArrayTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void CubeMapTextureArrayTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<CubeMapTextureArray, const CubeMapTextureArray&>{}));
CORRADE_VERIFY(!(std::is_assignable<CubeMapTextureArray, const CubeMapTextureArray&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::CubeMapTextureArrayTest)

9
src/Magnum/GL/Test/CubeMapTextureTest.cpp

@ -33,10 +33,12 @@ struct CubeMapTextureTest: TestSuite::Tester {
explicit CubeMapTextureTest();
void constructNoCreate();
void constructCopy();
};
CubeMapTextureTest::CubeMapTextureTest() {
addTests({&CubeMapTextureTest::constructNoCreate});
addTests({&CubeMapTextureTest::constructNoCreate,
&CubeMapTextureTest::constructCopy});
}
void CubeMapTextureTest::constructNoCreate() {
@ -48,6 +50,11 @@ void CubeMapTextureTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void CubeMapTextureTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<CubeMapTexture, const CubeMapTexture&>{}));
CORRADE_VERIFY(!(std::is_assignable<CubeMapTexture, const CubeMapTexture&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::CubeMapTextureTest)

7
src/Magnum/GL/Test/FramebufferGLTest.cpp

@ -56,7 +56,6 @@ struct FramebufferGLTest: OpenGLTester {
explicit FramebufferGLTest();
void construct();
void constructCopy();
void constructMove();
void wrap();
@ -169,7 +168,6 @@ struct FramebufferGLTest: OpenGLTester {
FramebufferGLTest::FramebufferGLTest() {
addTests({&FramebufferGLTest::construct,
&FramebufferGLTest::constructCopy,
&FramebufferGLTest::constructMove,
&FramebufferGLTest::wrap,
@ -303,11 +301,6 @@ void FramebufferGLTest::construct() {
MAGNUM_VERIFY_NO_GL_ERROR();
}
void FramebufferGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Framebuffer, const Framebuffer&>{}));
CORRADE_VERIFY(!(std::is_assignable<Framebuffer, const Framebuffer&>{}));
}
void FramebufferGLTest::constructMove() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::ARB::framebuffer_object>())

7
src/Magnum/GL/Test/FramebufferTest.cpp

@ -34,12 +34,14 @@ struct FramebufferTest: TestSuite::Tester {
explicit FramebufferTest();
void constructNoCreate();
void constructCopy();
void debugStatus();
};
FramebufferTest::FramebufferTest() {
addTests({&FramebufferTest::constructNoCreate,
&FramebufferTest::constructCopy,
&FramebufferTest::debugStatus});
}
@ -53,6 +55,11 @@ void FramebufferTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void FramebufferTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Framebuffer, const Framebuffer&>{}));
CORRADE_VERIFY(!(std::is_assignable<Framebuffer, const Framebuffer&>{}));
}
void FramebufferTest::debugStatus() {
std::ostringstream out;

7
src/Magnum/GL/Test/MeshGLTest.cpp

@ -52,7 +52,6 @@ struct MeshGLTest: OpenGLTester {
explicit MeshGLTest();
void construct();
void constructCopy();
void constructMove();
void wrap();
@ -164,7 +163,6 @@ struct MeshGLTest: OpenGLTester {
MeshGLTest::MeshGLTest() {
addTests({&MeshGLTest::construct,
&MeshGLTest::constructCopy,
&MeshGLTest::constructMove,
&MeshGLTest::wrap,
@ -304,11 +302,6 @@ void MeshGLTest::construct() {
MAGNUM_VERIFY_NO_GL_ERROR();
}
void MeshGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Mesh, const Mesh&>{}));
CORRADE_VERIFY(!(std::is_assignable<Mesh, const Mesh&>{}));
}
namespace {
struct FloatShader: AbstractShaderProgram {
explicit FloatShader(const std::string& type, const std::string& conversion);

10
src/Magnum/GL/Test/MeshTest.cpp

@ -42,6 +42,9 @@ struct MeshTest: TestSuite::Tester {
void constructNoCreate();
void constructViewNoCreate();
void constructCopy();
/* View *is* copyable */
void drawCountNotSet();
void drawViewCountNotSet();
@ -65,6 +68,8 @@ MeshTest::MeshTest() {
addTests({&MeshTest::constructNoCreate,
&MeshTest::constructViewNoCreate,
&MeshTest::constructCopy,
&MeshTest::drawCountNotSet,
&MeshTest::drawViewCountNotSet,
@ -103,6 +108,11 @@ void MeshTest::constructViewNoCreate() {
CORRADE_VERIFY(true);
}
void MeshTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Mesh, const Mesh&>{}));
CORRADE_VERIFY(!(std::is_assignable<Mesh, const Mesh&>{}));
}
namespace {
struct Shader: AbstractShaderProgram {
explicit Shader(NoCreateT): AbstractShaderProgram{NoCreate} {}

18
src/Magnum/GL/Test/MultisampleTextureTest.cpp

@ -34,11 +34,17 @@ struct MultisampleTextureTest: TestSuite::Tester {
void construct2DNoCreate();
void construct2DArrayNoCreate();
void constructCopy2D();
void constructCopy2DArray();
};
MultisampleTextureTest::MultisampleTextureTest() {
addTests({&MultisampleTextureTest::construct2DNoCreate,
&MultisampleTextureTest::construct2DArrayNoCreate});
&MultisampleTextureTest::construct2DArrayNoCreate,
&MultisampleTextureTest::constructCopy2D,
&MultisampleTextureTest::constructCopy2DArray});
}
void MultisampleTextureTest::construct2DNoCreate() {
@ -59,6 +65,16 @@ void MultisampleTextureTest::construct2DArrayNoCreate() {
CORRADE_VERIFY(true);
}
void MultisampleTextureTest::constructCopy2D() {
CORRADE_VERIFY(!(std::is_constructible<MultisampleTexture2D, const MultisampleTexture2D&>{}));
CORRADE_VERIFY(!(std::is_assignable<MultisampleTexture2D, const MultisampleTexture2D&>{}));
}
void MultisampleTextureTest::constructCopy2DArray() {
CORRADE_VERIFY(!(std::is_constructible<MultisampleTexture2DArray, const MultisampleTexture2DArray&>{}));
CORRADE_VERIFY(!(std::is_assignable<MultisampleTexture2DArray, const MultisampleTexture2DArray&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::MultisampleTextureTest)

9
src/Magnum/GL/Test/PrimitiveQueryTest.cpp

@ -33,10 +33,12 @@ struct PrimitiveQueryTest: TestSuite::Tester {
explicit PrimitiveQueryTest();
void constructNoCreate();
void constructCopy();
};
PrimitiveQueryTest::PrimitiveQueryTest() {
addTests({&PrimitiveQueryTest::constructNoCreate});
addTests({&PrimitiveQueryTest::constructNoCreate,
&PrimitiveQueryTest::constructCopy});
}
void PrimitiveQueryTest::constructNoCreate() {
@ -48,6 +50,11 @@ void PrimitiveQueryTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void PrimitiveQueryTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<PrimitiveQuery, const PrimitiveQuery&>{}));
CORRADE_VERIFY(!(std::is_assignable<PrimitiveQuery, const PrimitiveQuery&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::PrimitiveQueryTest)

9
src/Magnum/GL/Test/RectangleTextureTest.cpp

@ -33,10 +33,12 @@ struct RectangleTextureTest: TestSuite::Tester {
explicit RectangleTextureTest();
void constructNoCreate();
void constructCopy();
};
RectangleTextureTest::RectangleTextureTest() {
addTests({&RectangleTextureTest::constructNoCreate});
addTests({&RectangleTextureTest::constructNoCreate,
&RectangleTextureTest::constructCopy});
}
void RectangleTextureTest::constructNoCreate() {
@ -48,6 +50,11 @@ void RectangleTextureTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void RectangleTextureTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<RectangleTexture, const RectangleTexture&>{}));
CORRADE_VERIFY(!(std::is_assignable<RectangleTexture, const RectangleTexture&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::RectangleTextureTest)

7
src/Magnum/GL/Test/RenderbufferGLTest.cpp

@ -36,7 +36,6 @@ struct RenderbufferGLTest: OpenGLTester {
explicit RenderbufferGLTest();
void construct();
void constructCopy();
void constructMove();
void wrap();
@ -52,7 +51,6 @@ struct RenderbufferGLTest: OpenGLTester {
RenderbufferGLTest::RenderbufferGLTest() {
addTests({&RenderbufferGLTest::construct,
&RenderbufferGLTest::constructCopy,
&RenderbufferGLTest::constructMove,
&RenderbufferGLTest::wrap,
@ -84,11 +82,6 @@ void RenderbufferGLTest::construct() {
MAGNUM_VERIFY_NO_GL_ERROR();
}
void RenderbufferGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Renderbuffer, const Renderbuffer&>{}));
CORRADE_VERIFY(!(std::is_assignable<Renderbuffer, const Renderbuffer&>{}));
}
void RenderbufferGLTest::constructMove() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::ARB::framebuffer_object>())

9
src/Magnum/GL/Test/RenderbufferTest.cpp

@ -33,10 +33,17 @@ struct RenderbufferTest: TestSuite::Tester {
explicit RenderbufferTest();
void constructNoCreate();
void constructCopy();
};
RenderbufferTest::RenderbufferTest() {
addTests({&RenderbufferTest::constructNoCreate});
addTests({&RenderbufferTest::constructNoCreate,
&RenderbufferTest::constructCopy});
}
void RenderbufferTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Renderbuffer, const Renderbuffer&>{}));
CORRADE_VERIFY(!(std::is_assignable<Renderbuffer, const Renderbuffer&>{}));
}
void RenderbufferTest::constructNoCreate() {

9
src/Magnum/GL/Test/SampleQueryTest.cpp

@ -33,10 +33,12 @@ struct SampleQueryTest: TestSuite::Tester {
explicit SampleQueryTest();
void constructNoCreate();
void constructCopy();
};
SampleQueryTest::SampleQueryTest() {
addTests({&SampleQueryTest::constructNoCreate});
addTests({&SampleQueryTest::constructNoCreate,
&SampleQueryTest::constructCopy});
}
void SampleQueryTest::constructNoCreate() {
@ -48,6 +50,11 @@ void SampleQueryTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void SampleQueryTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<SampleQuery, const SampleQuery&>{}));
CORRADE_VERIFY(!(std::is_assignable<SampleQuery, const SampleQuery&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::SampleQueryTest)

7
src/Magnum/GL/Test/ShaderGLTest.cpp

@ -39,7 +39,6 @@ struct ShaderGLTest: OpenGLTester {
void construct();
void constructNoVersion();
void constructCopy();
void constructMove();
#ifndef MAGNUM_TARGET_WEBGL
@ -57,7 +56,6 @@ struct ShaderGLTest: OpenGLTester {
ShaderGLTest::ShaderGLTest() {
addTests({&ShaderGLTest::construct,
&ShaderGLTest::constructNoVersion,
&ShaderGLTest::constructCopy,
&ShaderGLTest::constructMove,
#ifndef MAGNUM_TARGET_WEBGL
@ -98,11 +96,6 @@ void ShaderGLTest::constructNoVersion() {
CORRADE_VERIFY(shader.sources().empty());
}
void ShaderGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Shader, const Shader&>{}));
CORRADE_VERIFY(!(std::is_assignable<Shader, const Shader&>{}));
}
void ShaderGLTest::constructMove() {
#ifndef MAGNUM_TARGET_GLES
Shader a(Version::GL300, Shader::Type::Fragment);

9
src/Magnum/GL/Test/ShaderTest.cpp

@ -33,11 +33,18 @@ namespace Magnum { namespace GL { namespace Test {
struct ShaderTest: TestSuite::Tester {
explicit ShaderTest();
void constructCopy();
void debugType();
};
ShaderTest::ShaderTest() {
addTests({&ShaderTest::debugType});
addTests({&ShaderTest::constructCopy,
&ShaderTest::debugType});
}
void ShaderTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<Shader, const Shader&>{}));
CORRADE_VERIFY(!(std::is_assignable<Shader, const Shader&>{}));
}
void ShaderTest::debugType() {

24
src/Magnum/GL/Test/TextureArrayTest.cpp

@ -36,6 +36,11 @@ struct TextureArrayTest: TestSuite::Tester {
void construct1DNoCreate();
#endif
void construct2DNoCreate();
#ifndef MAGNUM_TARGET_GLES
void constructCopy1D();
#endif
void constructCopy2D();
};
TextureArrayTest::TextureArrayTest() {
@ -43,7 +48,12 @@ TextureArrayTest::TextureArrayTest() {
#ifndef MAGNUM_TARGET_GLES
&TextureArrayTest::construct1DNoCreate,
#endif
&TextureArrayTest::construct2DNoCreate});
&TextureArrayTest::construct2DNoCreate,
#ifndef MAGNUM_TARGET_GLES
&TextureArrayTest::constructCopy1D,
#endif
&TextureArrayTest::constructCopy2D});
}
#ifndef MAGNUM_TARGET_GLES
@ -66,6 +76,18 @@ void TextureArrayTest::construct2DNoCreate() {
CORRADE_VERIFY(true);
}
#ifndef MAGNUM_TARGET_GLES
void TextureArrayTest::constructCopy1D() {
CORRADE_VERIFY(!(std::is_constructible<Texture1DArray, const Texture1DArray&>{}));
CORRADE_VERIFY(!(std::is_assignable<Texture1DArray, const Texture1DArray&>{}));
}
#endif
void TextureArrayTest::constructCopy2D() {
CORRADE_VERIFY(!(std::is_constructible<Texture2DArray, const Texture2DArray&>{}));
CORRADE_VERIFY(!(std::is_assignable<Texture2DArray, const Texture2DArray&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::TextureArrayTest)

37
src/Magnum/GL/Test/TextureTest.cpp

@ -39,6 +39,14 @@ struct TextureTest: TestSuite::Tester {
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
void construct3DNoCreate();
#endif
#ifndef MAGNUM_TARGET_GLES
void constructCopy1D();
#endif
void constructCopy2D();
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
void constructCopy3D();
#endif
};
TextureTest::TextureTest() {
@ -48,7 +56,15 @@ TextureTest::TextureTest() {
#endif
&TextureTest::construct2DNoCreate,
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
&TextureTest::construct3DNoCreate
&TextureTest::construct3DNoCreate,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureTest::constructCopy1D,
#endif
&TextureTest::constructCopy2D,
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
&TextureTest::constructCopy3D
#endif
});
}
@ -84,6 +100,25 @@ void TextureTest::construct3DNoCreate() {
}
#endif
#ifndef MAGNUM_TARGET_GLES
void TextureTest::constructCopy1D() {
CORRADE_VERIFY(!(std::is_constructible<Texture1D, const Texture1D&>{}));
CORRADE_VERIFY(!(std::is_assignable<Texture1D, const Texture1D&>{}));
}
#endif
void TextureTest::constructCopy2D() {
CORRADE_VERIFY(!(std::is_constructible<Texture2D, const Texture2D&>{}));
CORRADE_VERIFY(!(std::is_assignable<Texture2D, const Texture2D&>{}));
}
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
void TextureTest::constructCopy3D() {
CORRADE_VERIFY(!(std::is_constructible<Texture3D, const Texture3D&>{}));
CORRADE_VERIFY(!(std::is_assignable<Texture3D, const Texture3D&>{}));
}
#endif
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::TextureTest)

9
src/Magnum/GL/Test/TimeQueryTest.cpp

@ -33,10 +33,12 @@ struct TimeQueryTest: TestSuite::Tester {
explicit TimeQueryTest();
void constructNoCreate();
void constructCopy();
};
TimeQueryTest::TimeQueryTest() {
addTests({&TimeQueryTest::constructNoCreate});
addTests({&TimeQueryTest::constructNoCreate,
&TimeQueryTest::constructCopy});
}
void TimeQueryTest::constructNoCreate() {
@ -48,6 +50,11 @@ void TimeQueryTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void TimeQueryTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<TimeQuery, const TimeQuery&>{}));
CORRADE_VERIFY(!(std::is_assignable<TimeQuery, const TimeQuery&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::TimeQueryTest)

7
src/Magnum/GL/Test/TransformFeedbackGLTest.cpp

@ -46,7 +46,6 @@ struct TransformFeedbackGLTest: OpenGLTester {
explicit TransformFeedbackGLTest();
void construct();
void constructCopy();
void constructMove();
void wrap();
@ -88,7 +87,6 @@ const struct {
TransformFeedbackGLTest::TransformFeedbackGLTest() {
addTests({&TransformFeedbackGLTest::construct,
&TransformFeedbackGLTest::constructCopy,
&TransformFeedbackGLTest::constructMove,
&TransformFeedbackGLTest::wrap,
@ -125,11 +123,6 @@ void TransformFeedbackGLTest::construct() {
MAGNUM_VERIFY_NO_GL_ERROR();
}
void TransformFeedbackGLTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<TransformFeedback, const TransformFeedback&>{}));
CORRADE_VERIFY(!(std::is_assignable<TransformFeedback, const TransformFeedback&>{}));
}
void TransformFeedbackGLTest::constructMove() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::ARB::transform_feedback2>())

9
src/Magnum/GL/Test/TransformFeedbackTest.cpp

@ -33,10 +33,12 @@ struct TransformFeedbackTest: TestSuite::Tester {
explicit TransformFeedbackTest();
void constructNoCreate();
void constructCopy();
};
TransformFeedbackTest::TransformFeedbackTest() {
addTests({&TransformFeedbackTest::constructNoCreate});
addTests({&TransformFeedbackTest::constructNoCreate,
&TransformFeedbackTest::constructCopy});
}
void TransformFeedbackTest::constructNoCreate() {
@ -48,6 +50,11 @@ void TransformFeedbackTest::constructNoCreate() {
CORRADE_VERIFY(true);
}
void TransformFeedbackTest::constructCopy() {
CORRADE_VERIFY(!(std::is_constructible<TransformFeedback, const TransformFeedback&>{}));
CORRADE_VERIFY(!(std::is_assignable<TransformFeedback, const TransformFeedback&>{}));
}
}}}
CORRADE_TEST_MAIN(Magnum::GL::Test::TransformFeedbackTest)

Loading…
Cancel
Save