test_environment.h revision 0abdb66fa4e8e68904545af6df15cbe2116b6c43
134888cfbdcd1769789e922ed81f6f997073120baTony Barbour#ifndef TEST_ENVIRONMENT_H 234888cfbdcd1769789e922ed81f6f997073120baTony Barbour#define TEST_ENVIRONMENT_H 35b66aa51f060c804e1804cf45909ed6489552c62Chia-I Wu 49cc421eb545767e22fd723dc573a7a3225261b1cCourtney Goeltzenleuchter#include "vktestbinding.h" 534888cfbdcd1769789e922ed81f6f997073120baTony Barbour 69cc421eb545767e22fd723dc573a7a3225261b1cCourtney Goeltzenleuchternamespace vk_testing { 734888cfbdcd1769789e922ed81f6f997073120baTony Barbourclass Environment : public ::testing::Environment { 834888cfbdcd1769789e922ed81f6f997073120baTony Barbourpublic: 934888cfbdcd1769789e922ed81f6f997073120baTony Barbour Environment(); 1034888cfbdcd1769789e922ed81f6f997073120baTony Barbour 1134888cfbdcd1769789e922ed81f6f997073120baTony Barbour bool parse_args(int argc, char **argv); 1234888cfbdcd1769789e922ed81f6f997073120baTony Barbour 1334888cfbdcd1769789e922ed81f6f997073120baTony Barbour virtual void SetUp(); 1434888cfbdcd1769789e922ed81f6f997073120baTony Barbour virtual void TearDown(); 1534888cfbdcd1769789e922ed81f6f997073120baTony Barbour 1634888cfbdcd1769789e922ed81f6f997073120baTony Barbour const std::vector<Device *> &devices() { return devs_; } 1734888cfbdcd1769789e922ed81f6f997073120baTony Barbour Device &default_device() { return *(devs_[default_dev_]); } 18cedc15f3b62cfe757c583fe2106fe957a9ee30f9Jon Ashburn VkInstance get_instance() { return inst; } 198205d901f17b1c76d89c956be235cf4e7a20a546Tony Barbour VkPhysicalDevice gpus[16]; 2034888cfbdcd1769789e922ed81f6f997073120baTony Barbour 2134888cfbdcd1769789e922ed81f6f997073120baTony Barbourprivate: 22382489d723fd0d3935da0dc7e1021c56c7b721d3Courtney Goeltzenleuchter VkApplicationInfo app_; 230abdb66fa4e8e68904545af6df15cbe2116b6c43Courtney Goeltzenleuchter uint32_t default_dev_; 24382489d723fd0d3935da0dc7e1021c56c7b721d3Courtney Goeltzenleuchter VkInstance inst; 2534888cfbdcd1769789e922ed81f6f997073120baTony Barbour 2634888cfbdcd1769789e922ed81f6f997073120baTony Barbour std::vector<Device *> devs_; 2734888cfbdcd1769789e922ed81f6f997073120baTony Barbour}; 2834888cfbdcd1769789e922ed81f6f997073120baTony Barbour} 2934888cfbdcd1769789e922ed81f6f997073120baTony Barbour#endif // TEST_ENVIRONMENT_H 30