mirror of https://github.com/mosra/magnum.git
Browse Source
Tests for the NoCreate constructors were moved into non-GL test classes.pull/196/head
49 changed files with 887 additions and 282 deletions
@ -0,0 +1,64 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/BufferImage.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct BufferImageTest: TestSuite::Tester { |
||||||
|
explicit BufferImageTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
void constructNoCreateCompressed(); |
||||||
|
}; |
||||||
|
|
||||||
|
BufferImageTest::BufferImageTest() { |
||||||
|
addTests({&BufferImageTest::constructNoCreate, |
||||||
|
&BufferImageTest::constructNoCreateCompressed}); |
||||||
|
} |
||||||
|
|
||||||
|
void BufferImageTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
BufferImage2D image{NoCreate}; |
||||||
|
CORRADE_COMPARE(image.buffer().id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
void BufferImageTest::constructNoCreateCompressed() { |
||||||
|
{ |
||||||
|
CompressedBufferImage2D image{NoCreate}; |
||||||
|
CORRADE_COMPARE(image.buffer().id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::BufferImageTest) |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/BufferTexture.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct BufferTextureTest: TestSuite::Tester { |
||||||
|
explicit BufferTextureTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
BufferTextureTest::BufferTextureTest() { |
||||||
|
addTests({&BufferTextureTest::constructNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void BufferTextureTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
BufferTexture texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::BufferTextureTest) |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/CubeMapTextureArray.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct CubeMapTextureArrayTest: TestSuite::Tester { |
||||||
|
explicit CubeMapTextureArrayTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
CubeMapTextureArrayTest::CubeMapTextureArrayTest() { |
||||||
|
addTests({&CubeMapTextureArrayTest::constructNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void CubeMapTextureArrayTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
CubeMapTextureArray texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::CubeMapTextureArrayTest) |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/CubeMapTexture.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct CubeMapTextureTest: TestSuite::Tester { |
||||||
|
explicit CubeMapTextureTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
CubeMapTextureTest::CubeMapTextureTest() { |
||||||
|
addTests({&CubeMapTextureTest::constructNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void CubeMapTextureTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
CubeMapTexture texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::CubeMapTextureTest) |
||||||
@ -0,0 +1,64 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/MultisampleTexture.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct MultisampleTextureTest: TestSuite::Tester { |
||||||
|
explicit MultisampleTextureTest(); |
||||||
|
|
||||||
|
void construct2DNoCreate(); |
||||||
|
void construct2DArrayNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
MultisampleTextureTest::MultisampleTextureTest() { |
||||||
|
addTests({&MultisampleTextureTest::construct2DNoCreate, |
||||||
|
&MultisampleTextureTest::construct2DArrayNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void MultisampleTextureTest::construct2DNoCreate() { |
||||||
|
{ |
||||||
|
MultisampleTexture2D texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
void MultisampleTextureTest::construct2DArrayNoCreate() { |
||||||
|
{ |
||||||
|
MultisampleTexture2DArray texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::MultisampleTextureTest) |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/PrimitiveQuery.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct PrimitiveQueryTest: TestSuite::Tester { |
||||||
|
explicit PrimitiveQueryTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
PrimitiveQueryTest::PrimitiveQueryTest() { |
||||||
|
addTests({&PrimitiveQueryTest::constructNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void PrimitiveQueryTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
PrimitiveQuery query{NoCreate}; |
||||||
|
CORRADE_COMPARE(query.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::PrimitiveQueryTest) |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/RectangleTexture.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct RectangleTextureTest: TestSuite::Tester { |
||||||
|
explicit RectangleTextureTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
RectangleTextureTest::RectangleTextureTest() { |
||||||
|
addTests({&RectangleTextureTest::constructNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void RectangleTextureTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
RectangleTexture texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::RectangleTextureTest) |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/Renderbuffer.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct RenderbufferTest: TestSuite::Tester { |
||||||
|
explicit RenderbufferTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
RenderbufferTest::RenderbufferTest() { |
||||||
|
addTests({&RenderbufferTest::constructNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void RenderbufferTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
Renderbuffer renderbuffer{NoCreate}; |
||||||
|
CORRADE_COMPARE(renderbuffer.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::RenderbufferTest) |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/SampleQuery.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct SampleQueryTest: TestSuite::Tester { |
||||||
|
explicit SampleQueryTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
SampleQueryTest::SampleQueryTest() { |
||||||
|
addTests({&SampleQueryTest::constructNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void SampleQueryTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
SampleQuery query{NoCreate}; |
||||||
|
CORRADE_COMPARE(query.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::SampleQueryTest) |
||||||
@ -0,0 +1,71 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/TextureArray.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct TextureArrayTest: TestSuite::Tester { |
||||||
|
explicit TextureArrayTest(); |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
void construct1DNoCreate(); |
||||||
|
#endif |
||||||
|
void construct2DNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
TextureArrayTest::TextureArrayTest() { |
||||||
|
addTests({ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
&TextureArrayTest::construct1DNoCreate, |
||||||
|
#endif |
||||||
|
&TextureArrayTest::construct2DNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
void TextureArrayTest::construct1DNoCreate() { |
||||||
|
{ |
||||||
|
Texture1DArray texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
#endif |
||||||
|
|
||||||
|
void TextureArrayTest::construct2DNoCreate() { |
||||||
|
{ |
||||||
|
Texture2DArray texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::TextureArrayTest) |
||||||
@ -0,0 +1,89 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/Texture.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct TextureTest: TestSuite::Tester { |
||||||
|
explicit TextureTest(); |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
void construct1DNoCreate(); |
||||||
|
#endif |
||||||
|
void construct2DNoCreate(); |
||||||
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
||||||
|
void construct3DNoCreate(); |
||||||
|
#endif |
||||||
|
}; |
||||||
|
|
||||||
|
TextureTest::TextureTest() { |
||||||
|
addTests({ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
&TextureTest::construct1DNoCreate, |
||||||
|
#endif |
||||||
|
&TextureTest::construct2DNoCreate, |
||||||
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
||||||
|
&TextureTest::construct3DNoCreate |
||||||
|
#endif |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
void TextureTest::construct1DNoCreate() { |
||||||
|
{ |
||||||
|
Texture1D texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
#endif |
||||||
|
|
||||||
|
void TextureTest::construct2DNoCreate() { |
||||||
|
{ |
||||||
|
Texture2D texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
||||||
|
void TextureTest::construct3DNoCreate() { |
||||||
|
{ |
||||||
|
Texture3D texture{NoCreate}; |
||||||
|
CORRADE_COMPARE(texture.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
#endif |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::TextureTest) |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/TimeQuery.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct TimeQueryTest: TestSuite::Tester { |
||||||
|
explicit TimeQueryTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
TimeQueryTest::TimeQueryTest() { |
||||||
|
addTests({&TimeQueryTest::constructNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void TimeQueryTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
TimeQuery query{NoCreate}; |
||||||
|
CORRADE_COMPARE(query.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::TimeQueryTest) |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
||||||
|
Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
|
||||||
|
#include "Magnum/TransformFeedback.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Test { |
||||||
|
|
||||||
|
struct TransformFeedbackTest: TestSuite::Tester { |
||||||
|
explicit TransformFeedbackTest(); |
||||||
|
|
||||||
|
void constructNoCreate(); |
||||||
|
}; |
||||||
|
|
||||||
|
TransformFeedbackTest::TransformFeedbackTest() { |
||||||
|
addTests({&TransformFeedbackTest::constructNoCreate}); |
||||||
|
} |
||||||
|
|
||||||
|
void TransformFeedbackTest::constructNoCreate() { |
||||||
|
{ |
||||||
|
TransformFeedback xfb{NoCreate}; |
||||||
|
CORRADE_COMPARE(xfb.id(), 0); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Test::TransformFeedbackTest) |
||||||
Loading…
Reference in new issue