| 1 |
// SPDX-FileCopyrightText: 2019 - 2026 UnionTech Software Technology Co., Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 |
|
| 5 |
#include "test_customframe.h" |
| 6 |
|
| 7 |
test_customframe::test_customframe() |
| 8 |
{ |
| 9 |
mCustomFrame = new CustomFrame(); |
| 10 |
} |
| 11 |
|
| 12 |
test_customframe::~test_customframe() |
| 13 |
{ |
| 14 |
delete mCustomFrame; |
| 15 |
mCustomFrame = nullptr; |
| 16 |
} |
| 17 |
|
| 18 |
//void CustomFrame::setBColor(QColor normalC) |
| 19 |
TEST_F(test_customframe, setBcolor) |
| 20 |
{ |
| 21 |
mCustomFrame->setBColor(Qt::red); |
| 22 |
} |
| 23 |
|
| 24 |
//void CustomFrame::setRoundState(bool lstate, bool tstate, bool rstate, bool bstate) |
| 25 |
TEST_F(test_customframe, setRoundState) |
| 26 |
{ |
| 27 |
mCustomFrame->setRoundState(true, true, true, true); |
| 28 |
} |
| 29 |
|
| 30 |
//void CustomFrame::setTextStr(QFont font, QColor tc, QString strc, int flag) |
| 31 |
TEST_F(test_customframe, setTextStr) |
| 32 |
{ |
| 33 |
QFont font; |
| 34 |
mCustomFrame->setTextStr(font, Qt::red, "hello", 1); |
| 35 |
} |
| 36 |
|
| 37 |
//void CustomFrame::setTextStr(QString strc) |
| 38 |
TEST_F(test_customframe, setTextstr) |
| 39 |
{ |
| 40 |
mCustomFrame->setTextStr("hello"); |
| 41 |
} |
| 42 |
|
| 43 |
//void CustomFrame::setTextColor(QColor tc) |
| 44 |
TEST_F(test_customframe, setTextColor) |
| 45 |
{ |
| 46 |
mCustomFrame->setTextColor(Qt::red); |
| 47 |
} |
| 48 |
|
| 49 |
//void CustomFrame::setTextFont(QFont font) |
| 50 |
TEST_F(test_customframe, setTextFont) |
| 51 |
{ |
| 52 |
QFont font; |
| 53 |
mCustomFrame->setTextFont(font); |
| 54 |
} |
| 55 |
|
| 56 |
//void CustomFrame::setTextAlign(int flag) |
| 57 |
TEST_F(test_customframe, setTextAlign) |
| 58 |
{ |
| 59 |
mCustomFrame->setTextAlign(2); |
| 60 |
} |
| 61 |
|
| 62 |
//void CustomFrame::setRadius(int radius) |
| 63 |
TEST_F(test_customframe, setRadius) |
| 64 |
{ |
| 65 |
mCustomFrame->setRadius(4); |
| 66 |
} |
| 67 |
|
| 68 |
//void CustomFrame::setboreder(int framew) |
| 69 |
TEST_F(test_customframe, setboreder) |
| 70 |
{ |
| 71 |
mCustomFrame->setboreder(4); |
| 72 |
} |
| 73 |
|
| 74 |
//void CustomFrame::setFixedSize(int w, int h) |
| 75 |
TEST_F(test_customframe, setFixedSize) |
| 76 |
{ |
| 77 |
mCustomFrame->setFixedSize(40, 44); |
| 78 |
} |
| 79 |
|