blob: 57a2e9fc53c34015eb1a67f42b073c702f8f1847 [file] [log] [blame]
Jeremy Hayes6650d1f2016-04-20 09:00:39 -06001/*
2 * Copyright (c) 2015-2016 The Khronos Group Inc.
3 * Copyright (c) 2015-2016 Valve Corporation
4 * Copyright (c) 2015-2016 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and/or associated documentation files (the "Materials"), to
8 * deal in the Materials without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Materials, and to permit persons to whom the Materials are
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice(s) and this permission notice shall be included in
14 * all copies or substantial portions of the Materials.
15 *
16 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 *
20 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE
23 * USE OR OTHER DEALINGS IN THE MATERIALS.
24 *
25 * Author: Jeremy Hayes <jeremy@lunarG.com>
26 */
27
Jeremy Hayesd8726c22016-04-21 13:19:41 -060028#include <memory>
29
Jeremy Hayes6650d1f2016-04-20 09:00:39 -060030#include <vulkan/vulkan.h>
31#include "test_common.h"
32
Jeremy Hayesd8726c22016-04-21 13:19:41 -060033// Test groups:
34// LX = lunar exchange
35// LVLGH = loader and validation github
36// LVLGL = lodaer and validation gitlab
37
Jeremy Hayes6650d1f2016-04-20 09:00:39 -060038TEST(LX435, InstanceCreateInfoConst)
39{
40 const VkInstanceCreateInfo info =
41 {
42 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
43 nullptr,
44 0,
45 nullptr,
46 0,
47 nullptr,
48 0,
49 nullptr
50 };
51
52 VkInstance instance = VK_NULL_HANDLE;
53 VkResult result = vkCreateInstance(&info, VK_NULL_HANDLE, &instance);
54 EXPECT_EQ(result, VK_SUCCESS);
55}
56
Jeremy Hayesd8726c22016-04-21 13:19:41 -060057TEST(LX475, DestroyInstanceNullHandle)
58{
59 vkDestroyInstance(VK_NULL_HANDLE, nullptr);
60}
61
62TEST(LX475, DestroyDeviceNullHandle)
63{
64 vkDestroyDevice(VK_NULL_HANDLE, nullptr);
65}
66
Jeremy Hayes6650d1f2016-04-20 09:00:39 -060067int main(int argc, char **argv)
68{
69 int result;
70
71 ::testing::InitGoogleTest(&argc, argv);
72
73 result = RUN_ALL_TESTS();
74
75 return result;
76}