diff --git a/src/Magnum/GL/Test/AbstractQueryGLTest.cpp b/src/Magnum/GL/Test/AbstractQueryGLTest.cpp index 4b0221008..230479a24 100644 --- a/src/Magnum/GL/Test/AbstractQueryGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void AbstractQueryGLTest::constructMove() { #ifdef MAGNUM_TARGET_GLES2 if(!Context::current().isExtensionSupported()) diff --git a/src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp b/src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp index a79f0e982..07941a945 100644 --- a/src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void AbstractShaderProgramGLTest::constructMove() { DummyShader a; const Int id = a.id(); diff --git a/src/Magnum/GL/Test/AbstractShaderProgramTest.cpp b/src/Magnum/GL/Test/AbstractShaderProgramTest.cpp index 5378b83aa..a4717b5c2 100644 --- a/src/Magnum/GL/Test/AbstractShaderProgramTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::AbstractShaderProgramTest) diff --git a/src/Magnum/GL/Test/AbstractTextureGLTest.cpp b/src/Magnum/GL/Test/AbstractTextureGLTest.cpp index 3b6259841..f842234f5 100644 --- a/src/Magnum/GL/Test/AbstractTextureGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void AbstractTextureGLTest::constructMove() { Texture2D a; const Int id = a.id(); diff --git a/src/Magnum/GL/Test/BufferGLTest.cpp b/src/Magnum/GL/Test/BufferGLTest.cpp index 576f31019..77e0f5efe 100644 --- a/src/Magnum/GL/Test/BufferGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void BufferGLTest::constructMove() { Buffer a; const Int id = a.id(); diff --git a/src/Magnum/GL/Test/BufferImageGLTest.cpp b/src/Magnum/GL/Test/BufferImageGLTest.cpp index 03c0544bc..c0b5a9563 100644 --- a/src/Magnum/GL/Test/BufferImageGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - -void BufferImageGLTest::constructCopyCompressed() { - CORRADE_VERIFY(!(std::is_constructible{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void BufferImageGLTest::constructMove() { const char data[4] = { 'a', 'b', 'c', 'd' }; BufferImage2D a{PixelFormat::Red, PixelType::UnsignedByte, {4, 1}, data, BufferUsage::StaticDraw}; diff --git a/src/Magnum/GL/Test/BufferImageTest.cpp b/src/Magnum/GL/Test/BufferImageTest.cpp index 20a75c232..a020cc68f 100644 --- a/src/Magnum/GL/Test/BufferImageTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + +void BufferImageTest::constructCopyCompressed() { + CORRADE_VERIFY(!(std::is_constructible{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::BufferImageTest) diff --git a/src/Magnum/GL/Test/BufferTest.cpp b/src/Magnum/GL/Test/BufferTest.cpp index 31fa28398..a6d1837cd 100644 --- a/src/Magnum/GL/Test/BufferTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + void BufferTest::debugTargetHint() { std::ostringstream out; Debug{&out} << Buffer::TargetHint::Array << Buffer::TargetHint(0xdead); diff --git a/src/Magnum/GL/Test/BufferTextureTest.cpp b/src/Magnum/GL/Test/BufferTextureTest.cpp index c201a230a..63d103940 100644 --- a/src/Magnum/GL/Test/BufferTextureTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::BufferTextureTest) diff --git a/src/Magnum/GL/Test/ContextGLTest.cpp b/src/Magnum/GL/Test/ContextGLTest.cpp index 681270ef5..e2b282d5d 100644 --- a/src/Magnum/GL/Test/ContextGLTest.cpp +++ b/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{})); - CORRADE_VERIFY((std::is_constructible{})); - CORRADE_VERIFY(!(std::is_assignable{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void ContextGLTest::isVersionSupported() { const Version v = Context::current().version(); CORRADE_VERIFY(Context::current().isVersionSupported(v)); diff --git a/src/Magnum/GL/Test/ContextTest.cpp b/src/Magnum/GL/Test/ContextTest.cpp index fee5efe05..918e1383e 100644 --- a/src/Magnum/GL/Test/ContextTest.cpp +++ b/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{})); + CORRADE_VERIFY((std::is_constructible{})); + CORRADE_VERIFY(!(std::is_assignable{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + void ContextTest::extensions() { const char* used[GL::Implementation::ExtensionCount]{}; diff --git a/src/Magnum/GL/Test/CubeMapTextureArrayTest.cpp b/src/Magnum/GL/Test/CubeMapTextureArrayTest.cpp index c204efdef..88000bd92 100644 --- a/src/Magnum/GL/Test/CubeMapTextureArrayTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::CubeMapTextureArrayTest) diff --git a/src/Magnum/GL/Test/CubeMapTextureTest.cpp b/src/Magnum/GL/Test/CubeMapTextureTest.cpp index b13447bc1..9e84e0253 100644 --- a/src/Magnum/GL/Test/CubeMapTextureTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::CubeMapTextureTest) diff --git a/src/Magnum/GL/Test/FramebufferGLTest.cpp b/src/Magnum/GL/Test/FramebufferGLTest.cpp index 57550e662..d41364561 100644 --- a/src/Magnum/GL/Test/FramebufferGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void FramebufferGLTest::constructMove() { #ifndef MAGNUM_TARGET_GLES if(!Context::current().isExtensionSupported()) diff --git a/src/Magnum/GL/Test/FramebufferTest.cpp b/src/Magnum/GL/Test/FramebufferTest.cpp index fd7af2b34..41f9a6ef2 100644 --- a/src/Magnum/GL/Test/FramebufferTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + void FramebufferTest::debugStatus() { std::ostringstream out; diff --git a/src/Magnum/GL/Test/MeshGLTest.cpp b/src/Magnum/GL/Test/MeshGLTest.cpp index 503310bae..d09ebb229 100644 --- a/src/Magnum/GL/Test/MeshGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - namespace { struct FloatShader: AbstractShaderProgram { explicit FloatShader(const std::string& type, const std::string& conversion); diff --git a/src/Magnum/GL/Test/MeshTest.cpp b/src/Magnum/GL/Test/MeshTest.cpp index 0e300b451..3d189f91c 100644 --- a/src/Magnum/GL/Test/MeshTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + namespace { struct Shader: AbstractShaderProgram { explicit Shader(NoCreateT): AbstractShaderProgram{NoCreate} {} diff --git a/src/Magnum/GL/Test/MultisampleTextureTest.cpp b/src/Magnum/GL/Test/MultisampleTextureTest.cpp index a861d64d6..f746e5154 100644 --- a/src/Magnum/GL/Test/MultisampleTextureTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + +void MultisampleTextureTest::constructCopy2DArray() { + CORRADE_VERIFY(!(std::is_constructible{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::MultisampleTextureTest) diff --git a/src/Magnum/GL/Test/PrimitiveQueryTest.cpp b/src/Magnum/GL/Test/PrimitiveQueryTest.cpp index d5ae73de9..2fc7b2134 100644 --- a/src/Magnum/GL/Test/PrimitiveQueryTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::PrimitiveQueryTest) diff --git a/src/Magnum/GL/Test/RectangleTextureTest.cpp b/src/Magnum/GL/Test/RectangleTextureTest.cpp index a228311df..050215801 100644 --- a/src/Magnum/GL/Test/RectangleTextureTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::RectangleTextureTest) diff --git a/src/Magnum/GL/Test/RenderbufferGLTest.cpp b/src/Magnum/GL/Test/RenderbufferGLTest.cpp index 0cb0b7906..9edf6a6de 100644 --- a/src/Magnum/GL/Test/RenderbufferGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void RenderbufferGLTest::constructMove() { #ifndef MAGNUM_TARGET_GLES if(!Context::current().isExtensionSupported()) diff --git a/src/Magnum/GL/Test/RenderbufferTest.cpp b/src/Magnum/GL/Test/RenderbufferTest.cpp index c7f7b8d05..c66f52e0f 100644 --- a/src/Magnum/GL/Test/RenderbufferTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); } void RenderbufferTest::constructNoCreate() { diff --git a/src/Magnum/GL/Test/SampleQueryTest.cpp b/src/Magnum/GL/Test/SampleQueryTest.cpp index 24d2d2df5..b504f0214 100644 --- a/src/Magnum/GL/Test/SampleQueryTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::SampleQueryTest) diff --git a/src/Magnum/GL/Test/ShaderGLTest.cpp b/src/Magnum/GL/Test/ShaderGLTest.cpp index cca23260d..7ba467081 100644 --- a/src/Magnum/GL/Test/ShaderGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void ShaderGLTest::constructMove() { #ifndef MAGNUM_TARGET_GLES Shader a(Version::GL300, Shader::Type::Fragment); diff --git a/src/Magnum/GL/Test/ShaderTest.cpp b/src/Magnum/GL/Test/ShaderTest.cpp index efa0a00f1..a717fdf6c 100644 --- a/src/Magnum/GL/Test/ShaderTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); } void ShaderTest::debugType() { diff --git a/src/Magnum/GL/Test/TextureArrayTest.cpp b/src/Magnum/GL/Test/TextureArrayTest.cpp index e340832ec..9a55b5102 100644 --- a/src/Magnum/GL/Test/TextureArrayTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} +#endif + +void TextureArrayTest::constructCopy2D() { + CORRADE_VERIFY(!(std::is_constructible{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::TextureArrayTest) diff --git a/src/Magnum/GL/Test/TextureTest.cpp b/src/Magnum/GL/Test/TextureTest.cpp index a16d1dac9..11d09ff40 100644 --- a/src/Magnum/GL/Test/TextureTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} +#endif + +void TextureTest::constructCopy2D() { + CORRADE_VERIFY(!(std::is_constructible{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + +#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) +void TextureTest::constructCopy3D() { + CORRADE_VERIFY(!(std::is_constructible{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} +#endif + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::TextureTest) diff --git a/src/Magnum/GL/Test/TimeQueryTest.cpp b/src/Magnum/GL/Test/TimeQueryTest.cpp index b3452202f..d2210b148 100644 --- a/src/Magnum/GL/Test/TimeQueryTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::TimeQueryTest) diff --git a/src/Magnum/GL/Test/TransformFeedbackGLTest.cpp b/src/Magnum/GL/Test/TransformFeedbackGLTest.cpp index 39ab69c73..cd83daa6d 100644 --- a/src/Magnum/GL/Test/TransformFeedbackGLTest.cpp +++ b/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{})); - CORRADE_VERIFY(!(std::is_assignable{})); -} - void TransformFeedbackGLTest::constructMove() { #ifndef MAGNUM_TARGET_GLES if(!Context::current().isExtensionSupported()) diff --git a/src/Magnum/GL/Test/TransformFeedbackTest.cpp b/src/Magnum/GL/Test/TransformFeedbackTest.cpp index d61879e74..cebee76d7 100644 --- a/src/Magnum/GL/Test/TransformFeedbackTest.cpp +++ b/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{})); + CORRADE_VERIFY(!(std::is_assignable{})); +} + }}} CORRADE_TEST_MAIN(Magnum::GL::Test::TransformFeedbackTest)