33// See the top-level COPYRIGHT file for details.
44// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55// ---------------------------------------------------------------------------//
6- // ! \file cqiree/cqiree .test.cc
6+ // ! \file cqiree/CQiree .test.cc
77// ---------------------------------------------------------------------------//
88#include " cqiree/CQiree.h"
99
1919#include " qiree/Assert.hh"
2020#include " qiree_test.hh"
2121
22+ // ---------------------------------------------------------------------------//
2223// Declare function pointer types, e.g. qiree_create_t
24+ // Note that using decltype requires the CQiree.h header file.
2325#define DECLARE_FUNCPTR (FUNC ) \
2426 using qiree_##FUNC##_t = std::add_pointer_t <decltype (qiree_##FUNC)>;
2527
@@ -35,6 +37,7 @@ DECLARE_FUNCPTR(save_result_items);
3537DECLARE_FUNCPTR (destroy);
3638#undef DECLARE_FUNCPTR
3739
40+ // ---------------------------------------------------------------------------//
3841class CQireeTest : public ::qiree::test::Test
3942{
4043 protected:
@@ -71,7 +74,11 @@ class CQireeTest : public ::qiree::test::Test
7174 }
7275 }
7376
77+ protected:
78+ // // DATA ////
79+
7480 void * lib_handle_ = nullptr ;
81+
7582 qiree_create_t create_fn_ = nullptr ;
7683 qiree_load_module_from_memory_t load_module_from_memory_fn_ = nullptr ;
7784 qiree_load_module_from_file_t load_module_from_file_fn_ = nullptr ;
@@ -84,6 +91,7 @@ class CQireeTest : public ::qiree::test::Test
8491 qiree_destroy_t destroy_fn_ = nullptr ;
8592};
8693
94+ // ---------------------------------------------------------------------------//
8795TEST_F (CQireeTest, CreateAndDestroy)
8896{
8997 CQiree* manager = create_fn_ ();
0 commit comments