Blender  V2.93
gpu_testing.hh
Go to the documentation of this file.
1 #include "testing/testing.h"
2 
3 #include "GHOST_C-api.h"
4 
5 struct GPUContext;
6 
7 namespace blender::gpu {
8 
9 /* Test class that setups a GPUContext for test cases.
10  *
11  * Usage:
12  * TEST_F(GPUTest, my_gpu_test) {
13  * ...
14  * }
15  */
16 class GPUTest : public ::testing::Test {
17  private:
18  GHOST_SystemHandle ghost_system;
19  GHOST_ContextHandle ghost_context;
20  struct GPUContext *context;
21 
22  protected:
23  void SetUp() override;
24  void TearDown() override;
25 };
26 
27 } // namespace blender::gpu
GHOST C-API function and type declarations.
struct GPUContext GPUContext
Definition: GPU_context.h:44
void TearDown() override
Definition: gpu_testing.cc:22
void SetUp() override
Definition: gpu_testing.cc:13
struct SELECTID_Context context
Definition: select_engine.c:47