From 04a3f9588b38a67bb9da2c01bb861911f393b326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 19 May 2018 16:07:30 +0200 Subject: [PATCH] Platform: test compilation & linking of all Application libraries. Because these are static, there can be various problems when linking them later, so better to test that as early as possible. This was done in the magnum-bootstrap CI setup before, but that's often too late to discover problems. --- src/Magnum/Platform/CMakeLists.txt | 4 + .../Platform/Test/AndroidApplicationTest.cpp | 37 ++++++++ src/Magnum/Platform/Test/CMakeLists.txt | 92 +++++++++++++++++++ .../Platform/Test/GlfwApplicationTest.cpp | 37 ++++++++ .../Platform/Test/GlutApplicationTest.cpp | 37 ++++++++ .../Platform/Test/GlxApplicationTest.cpp | 37 ++++++++ .../Platform/Test/Sdl2ApplicationTest.cpp | 37 ++++++++ .../Test/WindowlessCglApplicationTest.cpp | 37 ++++++++ .../Test/WindowlessEglApplicationTest.cpp | 37 ++++++++ .../Test/WindowlessGlxApplicationTest.cpp | 37 ++++++++ .../Test/WindowlessIosApplicationTest.cpp | 37 ++++++++ .../Test/WindowlessWglApplicationTest.cpp | 37 ++++++++ .../WindowlessWindowsEglApplicationTest.cpp | 37 ++++++++ .../Platform/Test/XEglApplicationTest.cpp | 37 ++++++++ 14 files changed, 540 insertions(+) create mode 100644 src/Magnum/Platform/Test/AndroidApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/CMakeLists.txt create mode 100644 src/Magnum/Platform/Test/GlfwApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/GlutApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/GlxApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/WindowlessCglApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/WindowlessEglApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/WindowlessGlxApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/WindowlessIosApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/WindowlessWglApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/WindowlessWindowsEglApplicationTest.cpp create mode 100644 src/Magnum/Platform/Test/XEglApplicationTest.cpp diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index b42f10c25..9010c8d09 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/src/Magnum/Platform/CMakeLists.txt @@ -791,3 +791,7 @@ endif() # Force IDEs display also all header files and additional files in project view add_custom_target(MagnumPlatform SOURCES ${MagnumPlatform_HEADERS} ${MagnumPlatform_FILES}) set_target_properties(MagnumPlatform PROPERTIES FOLDER "Magnum/Platform") + +if(BUILD_TESTS) + add_subdirectory(Test) +endif() diff --git a/src/Magnum/Platform/Test/AndroidApplicationTest.cpp b/src/Magnum/Platform/Test/AndroidApplicationTest.cpp new file mode 100644 index 000000000..de68e9a3d --- /dev/null +++ b/src/Magnum/Platform/Test/AndroidApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/AndroidApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct AndroidApplicationTest: Platform::Application { + explicit AndroidApplicationTest(const Arguments& arguments): Platform::Application{arguments} {} + void drawEvent() override {} +}; + +}}} + +MAGNUM_APPLICATION_MAIN(Magnum::Platform::Test::AndroidApplicationTest) diff --git a/src/Magnum/Platform/Test/CMakeLists.txt b/src/Magnum/Platform/Test/CMakeLists.txt new file mode 100644 index 000000000..11ced3971 --- /dev/null +++ b/src/Magnum/Platform/Test/CMakeLists.txt @@ -0,0 +1,92 @@ +# +# This file is part of Magnum. +# +# Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 +# Vladimír Vondruš +# +# 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. +# + +if(WITH_ANDROIDAPPLICATION) + add_library(PlatformAndroidApplicationTest SHARED AndroidApplicationTest.cpp) + target_link_libraries(PlatformAndroidApplicationTest PRIVATE MagnumAndroidApplication) +endif() + +if(WITH_GLFWAPPLICATION) + add_executable(PlatformGlfwApplicationTest GlfwApplicationTest.cpp) + target_link_libraries(PlatformGlfwApplicationTest PRIVATE MagnumGlfwApplication) +endif() + +if(WITH_GLUTAPPLICATION) + add_executable(PlatformGlutApplicationTest GlutApplicationTest.cpp) + target_link_libraries(PlatformGlutApplicationTest PRIVATE MagnumGlutApplication) +endif() + +if(WITH_GLXAPPLICATION) + add_executable(PlatformGlxApplicationTest GlxApplicationTest.cpp) + target_link_libraries(PlatformGlxApplicationTest PRIVATE MagnumGlxApplication) +endif() + +if(WITH_SDL2APPLICATION) + add_executable(PlatformSdl2ApplicationTest Sdl2ApplicationTest.cpp) + target_link_libraries(PlatformSdl2ApplicationTest PRIVATE MagnumSdl2Application) + if(CORRADE_TARGET_IOS) + set_target_properties(PlatformSdl2ApplicationTest PROPERTIES + MACOSX_BUNDLE ON + XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES") + endif() +endif() + +if(WITH_XEGLAPPLICATION) + add_executable(PlatformXEglApplicationTest XEglApplicationTest.cpp) + target_link_libraries(PlatformXEglApplicationTest PRIVATE MagnumXEglApplication) +endif() + +if(WITH_WINDOWLESSCGLAPPLICATION) + add_executable(PlatformWindowlessCglApplicationTest WindowlessCglApplicationTest.cpp) + target_link_libraries(PlatformWindowlessCglApplicationTest PRIVATE MagnumWindowlessCglApplication) +endif() + +if(WITH_WINDOWLESSEGLAPPLICATION) + add_executable(PlatformWindowlessEglApplicationTest WindowlessEglApplicationTest.cpp) + target_link_libraries(PlatformWindowlessEglApplicationTest PRIVATE MagnumWindowlessEglApplication) +endif() + +if(WITH_WINDOWLESSGLXAPPLICATION) + add_executable(PlatformWindowlessGlxApplicationTest WindowlessGlxApplicationTest.cpp) + target_link_libraries(PlatformWindowlessGlxApplicationTest PRIVATE MagnumWindowlessGlxApplication) +endif() + +if(WITH_WINDOWLESSIOSAPPLICATION) + add_executable(PlatformWindowlessIosApplicationTest WindowlessIosApplicationTest.cpp) + target_link_libraries(PlatformWindowlessIosApplicationTest PRIVATE MagnumWindowlessIosApplication) + set_target_properties(PlatformWindowlessIosApplicationTest PROPERTIES + MACOSX_BUNDLE ON + XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES") +endif() + +if(WITH_WINDOWLESSWGLAPPLICATION) + add_executable(PlatformWindowlessWglApplicationTest WindowlessWglApplicationTest.cpp) + target_link_libraries(PlatformWindowlessWglApplicationTest PRIVATE MagnumWindowlessWglApplication) +endif() + +if(WITH_WINDOWLESSWINDOWSEGLAPPLICATION) + add_executable(PlatformWindowlessWindowsEglApplicationTest WindowlessWindowsEglApplicationTest.cpp) + target_link_libraries(PlatformWindowlessWindowsEglApplicationTest PRIVATE MagnumWindowlessWindowsEglApplication) +endif() diff --git a/src/Magnum/Platform/Test/GlfwApplicationTest.cpp b/src/Magnum/Platform/Test/GlfwApplicationTest.cpp new file mode 100644 index 000000000..4529a843b --- /dev/null +++ b/src/Magnum/Platform/Test/GlfwApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/GlfwApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct GlfwApplicationTest: Platform::Application { + explicit GlfwApplicationTest(const Arguments& arguments): Platform::Application{arguments} {} + void drawEvent() override {} +}; + +}}} + +MAGNUM_APPLICATION_MAIN(Magnum::Platform::Test::GlfwApplicationTest) diff --git a/src/Magnum/Platform/Test/GlutApplicationTest.cpp b/src/Magnum/Platform/Test/GlutApplicationTest.cpp new file mode 100644 index 000000000..58ec733fd --- /dev/null +++ b/src/Magnum/Platform/Test/GlutApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/GlutApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct GlutApplicationTest: Platform::Application { + explicit GlutApplicationTest(const Arguments& arguments): Platform::Application{arguments} {} + void drawEvent() override {} +}; + +}}} + +MAGNUM_APPLICATION_MAIN(Magnum::Platform::Test::GlutApplicationTest) diff --git a/src/Magnum/Platform/Test/GlxApplicationTest.cpp b/src/Magnum/Platform/Test/GlxApplicationTest.cpp new file mode 100644 index 000000000..12babef84 --- /dev/null +++ b/src/Magnum/Platform/Test/GlxApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/GlxApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct GlxApplicationTest: Platform::Application { + explicit GlxApplicationTest(const Arguments& arguments): Platform::Application{arguments} {} + void drawEvent() override {} +}; + +}}} + +MAGNUM_APPLICATION_MAIN(Magnum::Platform::Test::GlxApplicationTest) diff --git a/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp b/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp new file mode 100644 index 000000000..c5f2a909f --- /dev/null +++ b/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/Sdl2Application.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct Sdl2ApplicationTest: Platform::Application { + explicit Sdl2ApplicationTest(const Arguments& arguments): Platform::Application{arguments} {} + void drawEvent() override {} +}; + +}}} + +MAGNUM_APPLICATION_MAIN(Magnum::Platform::Test::Sdl2ApplicationTest) diff --git a/src/Magnum/Platform/Test/WindowlessCglApplicationTest.cpp b/src/Magnum/Platform/Test/WindowlessCglApplicationTest.cpp new file mode 100644 index 000000000..2081c8cfb --- /dev/null +++ b/src/Magnum/Platform/Test/WindowlessCglApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/WindowlessCglApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct WindowlessCglApplicationTest: Platform::WindowlessApplication { + explicit WindowlessCglApplicationTest(const Arguments& arguments): Platform::WindowlessApplication{arguments} {} + int exec() override { return 0; } +}; + +}}} + +MAGNUM_WINDOWLESSAPPLICATION_MAIN(Magnum::Platform::Test::WindowlessCglApplicationTest) diff --git a/src/Magnum/Platform/Test/WindowlessEglApplicationTest.cpp b/src/Magnum/Platform/Test/WindowlessEglApplicationTest.cpp new file mode 100644 index 000000000..cc1182e5e --- /dev/null +++ b/src/Magnum/Platform/Test/WindowlessEglApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/WindowlessEglApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct WindowlessEglApplicationTest: Platform::WindowlessApplication { + explicit WindowlessEglApplicationTest(const Arguments& arguments): Platform::WindowlessApplication{arguments} {} + int exec() override { return 0; } +}; + +}}} + +MAGNUM_WINDOWLESSAPPLICATION_MAIN(Magnum::Platform::Test::WindowlessEglApplicationTest) diff --git a/src/Magnum/Platform/Test/WindowlessGlxApplicationTest.cpp b/src/Magnum/Platform/Test/WindowlessGlxApplicationTest.cpp new file mode 100644 index 000000000..984f18af0 --- /dev/null +++ b/src/Magnum/Platform/Test/WindowlessGlxApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/WindowlessGlxApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct WindowlessGlxApplicationTest: Platform::WindowlessApplication { + explicit WindowlessGlxApplicationTest(const Arguments& arguments): Platform::WindowlessApplication{arguments} {} + int exec() override { return 0; } +}; + +}}} + +MAGNUM_WINDOWLESSAPPLICATION_MAIN(Magnum::Platform::Test::WindowlessGlxApplicationTest) diff --git a/src/Magnum/Platform/Test/WindowlessIosApplicationTest.cpp b/src/Magnum/Platform/Test/WindowlessIosApplicationTest.cpp new file mode 100644 index 000000000..b1f1ab149 --- /dev/null +++ b/src/Magnum/Platform/Test/WindowlessIosApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/WindowlessIosApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct WindowlessIosApplicationTest: Platform::WindowlessApplication { + explicit WindowlessIosApplicationTest(const Arguments& arguments): Platform::WindowlessApplication{arguments} {} + int exec() override { return 0; } +}; + +}}} + +MAGNUM_WINDOWLESSAPPLICATION_MAIN(Magnum::Platform::Test::WindowlessIosApplicationTest) diff --git a/src/Magnum/Platform/Test/WindowlessWglApplicationTest.cpp b/src/Magnum/Platform/Test/WindowlessWglApplicationTest.cpp new file mode 100644 index 000000000..2458efd67 --- /dev/null +++ b/src/Magnum/Platform/Test/WindowlessWglApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/WindowlessWglApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct WindowlessWglApplicationTest: Platform::WindowlessApplication { + explicit WindowlessWglApplicationTest(const Arguments& arguments): Platform::WindowlessApplication{arguments} {} + int exec() override { return 0; } +}; + +}}} + +MAGNUM_WINDOWLESSAPPLICATION_MAIN(Magnum::Platform::Test::WindowlessWglApplicationTest) diff --git a/src/Magnum/Platform/Test/WindowlessWindowsEglApplicationTest.cpp b/src/Magnum/Platform/Test/WindowlessWindowsEglApplicationTest.cpp new file mode 100644 index 000000000..8b184c3f6 --- /dev/null +++ b/src/Magnum/Platform/Test/WindowlessWindowsEglApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/WindowlessWindowsEglApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct WindowlessWindowsEglApplicationTest: Platform::WindowlessApplication { + explicit WindowlessWindowsEglApplicationTest(const Arguments& arguments): Platform::WindowlessApplication{arguments} {} + int exec() override { return 0; } +}; + +}}} + +MAGNUM_WINDOWLESSAPPLICATION_MAIN(Magnum::Platform::Test::WindowlessWindowsEglApplicationTest) diff --git a/src/Magnum/Platform/Test/XEglApplicationTest.cpp b/src/Magnum/Platform/Test/XEglApplicationTest.cpp new file mode 100644 index 000000000..c41e0f4eb --- /dev/null +++ b/src/Magnum/Platform/Test/XEglApplicationTest.cpp @@ -0,0 +1,37 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + 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 "Magnum/Platform/XEglApplication.h" + +namespace Magnum { namespace Platform { namespace Test { + +struct XEglApplicationTest: Platform::Application { + explicit XEglApplicationTest(const Arguments& arguments): Platform::Application{arguments} {} + void drawEvent() override {} +}; + +}}} + +MAGNUM_APPLICATION_MAIN(Magnum::Platform::Test::XEglApplicationTest)