File: ut_dmpriscontrol.cpp

package info (click to toggle)
dtkwidget 5.7.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 36,540 kB
  • sloc: cpp: 63,257; ansic: 132; python: 88; sh: 42; makefile: 13
file content (31 lines) | stat: -rw-r--r-- 700 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

#include <gtest/gtest.h>

#include "private/dmpriscontrol_p.h"
#include "dmpriscontrol.h"
DWIDGET_USE_NAMESPACE
class ut_DMPRISControl : public testing::Test
{
protected:
    void SetUp() override
    {
        target = new DMPRISControl();
    }
    void TearDown() override
    {
        if (target) {
            delete target;
            target = nullptr;
        }
    }
    DMPRISControl *target = nullptr;
};

TEST_F(ut_DMPRISControl, isWorking)
{
    DMPRISControlPrivate* d = target->d_func();
    ASSERT_EQ(target->isWorking(), d->m_mprisInter != nullptr);
};