Debian Codegraph @

tests/dde-calendar-client-test/src/test_dataManage/test_schedulecoormanage.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_schedulecoormanage.h"
6 //#include <QDebug>
7
8 //test_schedulecoormanage::test_schedulecoormanage()
9 //{
10 // cScheduleCoorManage = new CScheduleCoorManage();
11 //}
12
13 //test_schedulecoormanage::~test_schedulecoormanage()
14 //{
15 // delete cScheduleCoorManage;
16 //}
17
18 ////void CScheduleCoorManage::setRange(int w, int h, QDate begindate, QDate enddate, int rightmagin)
19 //TEST_F(test_schedulecoormanage, setRange)
20 //{
21 // int w = 100;
22 // int h = 100;
23 // QDate begindate(2020, 12, 01);
24 // QDate enddate(2020, 12, 31);
25 // int rightmagin = 1;
26 // cScheduleCoorManage->setRange(w, h, begindate, enddate, rightmagin);
27 //}
28
29 ////void CScheduleCoorManage::setDateRange(QDate begindate, QDate enddate)
30 //TEST_F(test_schedulecoormanage, setDateRange)
31 //{
32 // QDate begindate(2020, 12, 01);
33 // QDate enddate(2020, 12, 21);
34 // cScheduleCoorManage->setDateRange(begindate, enddate);
35
36 // cScheduleCoorManage->setDateRange(enddate, begindate);
37
38 // int w = 100;
39 // int h = 100;
40 // QDate m_begindate(2020, 12, 11);
41 // QDate m_enddate(2020, 12, 31);
42 // int rightmagin = 1;
43 // cScheduleCoorManage->setRange(w, h, m_begindate, m_enddate, rightmagin);
44 // cScheduleCoorManage->setDateRange(begindate, enddate);
45 //}
46
47 ///**
48 // * @brief test_schedulecoormanage, getDrawRegion
49 // * (QDateTime begintime, QDateTime endtime)
50 // * (QDateTime begintime, QDateTime endtime, int index, int coount)
51 // * (QDate date, QDateTime begintime, QDateTime endtime, int index, int coount, int maxnum, int type)
52 // */
53 //TEST_F(test_schedulecoormanage, getDrawRegion)
54 //{
55 // QString begin = "2020-12-01 12:24:36";
56 // QDateTime begindate = QDateTime::fromString(begin, "yyyy-MM-dd hh:mm:ss");
57 // QString end = "2020-12-21 12:24:36";
58 // QDateTime enddate = QDateTime::fromString(end, "yyyy-MM-dd hh:mm:ss");
59
60 // cScheduleCoorManage->getDrawRegion(begindate, enddate);
61 // cScheduleCoorManage->getDrawRegion(enddate, begindate);
62
63 // int index = 2;
64 // int coount = 1;
65 // cScheduleCoorManage->getDrawRegion(begindate, enddate, index, coount);
66 // cScheduleCoorManage->getDrawRegion(enddate, begindate, index, coount);
67
68 // QDate date(2020, 12, 31);
69 // int maxnum = 3;
70 // int type = 0;
71 // cScheduleCoorManage->getDrawRegion(date, begindate, enddate, index, coount, maxnum, type);
72 // cScheduleCoorManage->getDrawRegion(date, enddate, begindate, index, coount, maxnum, type);
73 // int w = 100;
74 // int h = 100;
75 // QDate m_begindate(2020, 11, 11);
76 // QDate m_enddate(2020, 12, 31);
77 // int rightmagin = 1;
78 // cScheduleCoorManage->setRange(w, h, m_begindate, m_enddate, rightmagin);
79 // cScheduleCoorManage->getDrawRegion(begindate, enddate);
80 // cScheduleCoorManage->getDrawRegion(begindate, enddate, index, coount);
81
82 // coount = 5;
83 // cScheduleCoorManage->getDrawRegion(date, begindate, enddate, index, coount, maxnum, type);
84
85 // index = 5;
86 // cScheduleCoorManage->getDrawRegion(date, begindate, enddate, index, coount, maxnum, type);
87 //}
88
89 ////QRectF CScheduleCoorManage::getDrawRegionF(QDateTime begintime, QDateTime endtime)
90 //TEST_F(test_schedulecoormanage, getDrawRegionF)
91 //{
92 // QString begin = "2020-12-01 12:24:36";
93 // QDateTime begindate = QDateTime::fromString(begin, "yyyy-MM-dd hh:mm:ss");
94 // QString end = "2020-12-21 12:24:36";
95 // QDateTime enddate = QDateTime::fromString(end, "yyyy-MM-dd hh:mm:ss");
96
97 // cScheduleCoorManage->getDrawRegionF(begindate, enddate);
98 // cScheduleCoorManage->getDrawRegionF(enddate, begindate);
99
100 // int w = 100;
101 // int h = 100;
102 // QDate m_begindate(2020, 11, 11);
103 // QDate m_enddate(2020, 12, 31);
104 // int rightmagin = 1;
105 // cScheduleCoorManage->setRange(w, h, m_begindate, m_enddate, rightmagin);
106 // cScheduleCoorManage->getDrawRegionF(begindate, enddate);
107 //}
108
109 ////QRectF CScheduleCoorManage::getAllDayDrawRegion(QDate begin, QDate end)
110 //TEST_F(test_schedulecoormanage, getAllDayDrawRegion)
111 //{
112 // QDate begindate(2020, 12, 01);
113 // QDate enddate(2020, 12, 31);
114 // cScheduleCoorManage->getAllDayDrawRegion(begindate, enddate);
115 // cScheduleCoorManage->getAllDayDrawRegion(enddate, begindate);
116 //}
117
118 ////QDateTime CScheduleCoorManage::getDate(QPointF pos)
119 //TEST_F(test_schedulecoormanage, getDate)
120 //{
121 // QPointF pos(0, 0);
122 // QDateTime dateTime = cScheduleCoorManage->getDate(pos);
123 // qCInfo(CommonLogger) << dateTime;
124 // QPointF pos1(-1, 0);
125 // QDateTime dateTime1 = cScheduleCoorManage->getDate(pos1);
126 //}
127
128 ////QDate CScheduleCoorManage::getsDate(QPointF pos)
129 //TEST_F(test_schedulecoormanage, getsDate)
130 //{
131 // QPointF pos(0, 0);
132 // QDate date = cScheduleCoorManage->getsDate(pos);
133 // qCInfo(CommonLogger) << date;
134 // QPointF pos1(-1, 0);
135 // cScheduleCoorManage->getsDate(pos1);
136 //}
137
138 ////float CScheduleCoorManage::getHeight(const QTime &time)
139 //TEST_F(test_schedulecoormanage, getHeight)
140 //{
141 // QTime time(18, 8, 9, 30);
142 // assert(0 <= cScheduleCoorManage->getHeight(time));
143 //}
144
145 ////QDate getBegindate()
146 //TEST_F(test_schedulecoormanage, getBegindate)
147 //{
148 // int w = 100;
149 // int h = 100;
150 // QDate m_begindate(2020, 11, 11);
151 // QDate m_enddate(2020, 12, 31);
152 // int rightmagin = 1;
153 // cScheduleCoorManage->setRange(w, h, m_begindate, m_enddate, rightmagin);
154 // assert(m_begindate == cScheduleCoorManage->getBegindate());
155 //}