Debian Codegraph @

tests/dde-calendar-client-test/src/test_widget/test_monthWidget/test_monthweekview.cpp

raw
1 // SPDX-FileCopyrightText: 2019 - 2026 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-or-later
4
5 #include "test_monthweekview.h"
6 #include <QDate>
7 #include <QPaintEvent>
8
9 //test_monthweekview::test_monthweekview()
10 //{
11 // mMonthWeekView = new CMonthWeekView();
12 // mWeekRect = new WeekRect();
13 //}
14
15 //test_monthweekview::~test_monthweekview()
16 //{
17 // delete mMonthWeekView;
18 // mMonthWeekView = nullptr;
19 // delete mWeekRect;
20 // mWeekRect = nullptr;
21 //}
22
23 ////void CMonthWeekView::setFirstDay(const Qt::DayOfWeek weekday)
24 //TEST_F(test_monthweekview, setFirstDay)
25 //{
26 // mMonthWeekView->setFirstDay(static_cast<Qt::DayOfWeek>(QDate::currentDate().dayOfWeek()));
27 // mMonthWeekView->setFirstDay(static_cast<Qt::DayOfWeek>(QDate::currentDate().addDays(1).dayOfWeek()));
28 //}
29
30 ////void CMonthWeekView::setTheMe(int type)
31 //TEST_F(test_monthweekview, setTheMe)
32 //{
33 // mMonthWeekView->setTheMe(1);
34 // mMonthWeekView->setTheMe(2);
35 //}
36
37 ////void CMonthWeekView::setCurrentDate(const QDate &currentDate)
38 //TEST_F(test_monthweekview, setCurrentDate)
39 //{
40 // mMonthWeekView->setCurrentDate(QDate::currentDate());
41 //}
42
43 //TEST_F(test_monthweekview, paintEvent_01)
44 //{
45 // QPaintEvent e(QRect(0, 0, 1, 1));
46 // mMonthWeekView->paintEvent(&e);
47 //}
48
49 ////void WeekRect::setWeek(const Qt::DayOfWeek &showWeek, const bool &showLine)
50 //TEST_F(test_monthweekview, setWeek)
51 //{
52 // mWeekRect->setWeek(Qt::Sunday, false);
53 //}
54
55 ////void WeekRect::setRect(const QRectF &rectF)
56 //TEST_F(test_monthweekview, setRect)
57 //{
58 // mWeekRect->setRect(QRectF());
59 //}
60
61 ////void WeekRect::setTheMe(int type)
62 //TEST_F(test_monthweekview, setRectTheMe_01)
63 //{
64 // mWeekRect->setTheMe(1);
65 // EXPECT_EQ(mWeekRect->m_testColor, QColor("#6F6F6F"));
66 //}
67
68 ////void WeekRect::setTheMe(int type)
69 //TEST_F(test_monthweekview, setRectTheMe_02)
70 //{
71 // mWeekRect->setTheMe(3);
72 // EXPECT_EQ(mWeekRect->m_testColor, QColor("#C0C6D4"));
73 //}