From fe846ff445bbbbf84f513c0e9f1e58263df829cb Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Mon, 22 Mar 2021 10:24:07 +0100 Subject: [PATCH] Extendend test on designated initializers --- .../DesignatedInitializers.cpp | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/tests/DesignatedInitializers/DesignatedInitializers.cpp b/tests/DesignatedInitializers/DesignatedInitializers.cpp index 313b5fd..5ca2260 100644 --- a/tests/DesignatedInitializers/DesignatedInitializers.cpp +++ b/tests/DesignatedInitializers/DesignatedInitializers.cpp @@ -21,10 +21,33 @@ #include -#if defined(__clang__) || defined(__GNUC__) -#pragma GCC diagnostic ignored "-Wunused-variable" +#if defined( __clang__ ) || defined( __GNUC__ ) +# pragma GCC diagnostic ignored "-Wunused-variable" #endif +class MyVulkanTest +{ +public: + MyVulkanTest(); + +private: + vk::ApplicationInfo applicationInfo; +}; + +MyVulkanTest::MyVulkanTest() + : applicationInfo{ .pApplicationName = "My Application", + .applicationVersion = VK_MAKE_VERSION( 0, 0, 1 ), + .pEngineName = "My Engine", + .engineVersion = VK_MAKE_VERSION( 0, 0, 1 ), + .apiVersion = VK_API_VERSION_1_0 } +{ + this->applicationInfo = vk::ApplicationInfo{ .pApplicationName = "My Application", + .applicationVersion = VK_MAKE_VERSION( 0, 0, 1 ), + .pEngineName = "My Engine", + .engineVersion = VK_MAKE_VERSION( 0, 0, 1 ), + .apiVersion = VK_API_VERSION_1_0 }; +} + int main( int /*argc*/, char ** /*argv*/ ) { char const * appName = "DesignatedInitializers";