Debian Codegraph @

tests/ut_dutil.h

raw
1 // SPDX-FileCopyrightText: 2017 - 2023 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-or-later
4
5 #pragma once
6 #include "dtkcore_global.h"
7 #include <gtest/gtest.h>
8 #if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
9 #include "dtimedloop.h"
10 DCORE_USE_NAMESPACE
11 #endif
12
13 // 有返回值的 lambda 表达式、函数里面使用 ASSERT_XXX
14 // 总之,不管有没有返回值,用它就对了
15 #ifndef HAVE_FUN
16 #define HAVE_FUN(X) [&](){X;}();
17 #endif
18
19 class ut_DUtil : public testing::Test
20 {
21 protected:
22 static void SetUpTestCase();
23 static void TearDownTestCase();
24 virtual void SetUp();
25 virtual void TearDown();
26 };