Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 1 | // VK tests |
| 2 | // |
Karl Schultz | 929a100 | 2016-02-04 11:33:21 -0700 | [diff] [blame] | 3 | // Copyright (c) 2015-2016 The Khronos Group Inc. |
| 4 | // Copyright (c) 2015-2016 Valve Corporation |
| 5 | // Copyright (c) 2015-2016 LunarG, Inc. |
| 6 | // Copyright (c) 2015-2016 Google, Inc. |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 7 | // |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 8 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | // you may not use this file except in compliance with the License. |
| 10 | // You may obtain a copy of the License at |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 11 | // |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 12 | // http://www.apache.org/licenses/LICENSE-2.0 |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 13 | // |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 14 | // Unless required by applicable law or agreed to in writing, software |
| 15 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | // See the License for the specific language governing permissions and |
| 18 | // limitations under the License. |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 19 | |
| 20 | #ifndef VKTESTFRAMEWORKANDROID_H |
| 21 | #define VKTESTFRAMEWORKANDROID_H |
| 22 | |
| 23 | #include "test_common.h" |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 24 | |
| 25 | #if defined(NDEBUG) |
| 26 | #define U_ASSERT_ONLY __attribute__((unused)) |
| 27 | #else |
| 28 | #define U_ASSERT_ONLY |
| 29 | #endif |
| 30 | |
| 31 | // Can be used by tests to record additional details / description of test |
| 32 | #define TEST_DESCRIPTION(desc) RecordProperty("description", desc) |
| 33 | |
Mark Lobodzinski | c6a6214 | 2016-09-07 16:35:55 -0600 | [diff] [blame] | 34 | #define ICD_SPV_MAGIC 0x07230203 |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 35 | |
Mark Lobodzinski | c6a6214 | 2016-09-07 16:35:55 -0600 | [diff] [blame] | 36 | class VkTestFramework : public ::testing::Test { |
Mark Lobodzinski | 64318ba | 2017-01-26 13:34:13 -0700 | [diff] [blame] | 37 | public: |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 38 | VkTestFramework(); |
| 39 | ~VkTestFramework(); |
| 40 | |
| 41 | static void InitArgs(int *argc, char *argv[]); |
| 42 | static void Finish(); |
| 43 | |
Michael Lentine | b62cc05 | 2015-12-09 08:44:25 -0800 | [diff] [blame] | 44 | VkFormat GetFormat(VkInstance instance, vk_testing::Device *device); |
Mark Lobodzinski | c6a6214 | 2016-09-07 16:35:55 -0600 | [diff] [blame] | 45 | bool GLSLtoSPV(const VkShaderStageFlagBits shader_type, const char *pshader, std::vector<unsigned int> &spv); |
Tobin Ehlis | 7288864 | 2017-11-15 09:43:56 -0700 | [diff] [blame] | 46 | static bool m_devsim_layer; |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 47 | }; |
| 48 | |
Mark Lobodzinski | c6a6214 | 2016-09-07 16:35:55 -0600 | [diff] [blame] | 49 | class TestEnvironment : public ::testing::Environment { |
Mark Lobodzinski | 64318ba | 2017-01-26 13:34:13 -0700 | [diff] [blame] | 50 | public: |
Mark Lobodzinski | c6a6214 | 2016-09-07 16:35:55 -0600 | [diff] [blame] | 51 | void SetUp(); |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 52 | |
Mark Lobodzinski | c6a6214 | 2016-09-07 16:35:55 -0600 | [diff] [blame] | 53 | void TearDown(); |
Michael Lentine | 83ab341 | 2015-11-03 16:20:30 -0800 | [diff] [blame] | 54 | }; |
| 55 | |
| 56 | #endif |