Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfx_datetime_unittest.cpp
Go to the documentation of this file.
1
// Copyright 2021 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#
include
"core/fxcrt/cfx_datetime.h"
6
7
#
include
"core/fxcrt/fake_time_test.h"
8
9
TEST_F
(
FakeTimeTest
,
Now
) {
10
CFX_DateTime
dt =
CFX_DateTime
::
Now
(
)
;
11
EXPECT_EQ(2020, dt
.
GetYear
(
)
);
12
EXPECT_EQ(4, dt
.
GetMonth
(
)
);
13
EXPECT_EQ(23, dt
.
GetDay
(
)
);
14
EXPECT_EQ(15, dt
.
GetHour
(
)
);
15
EXPECT_EQ(5, dt
.
GetMinute
(
)
);
16
EXPECT_EQ(21, dt
.
GetSecond
(
)
);
17
EXPECT_EQ(0, dt
.
GetMillisecond
(
)
);
18
}
TEST_F
TEST_F(FakeTimeTest, Now)
Definition
cfx_datetime_unittest.cpp:9
CFX_DateTime
Definition
cfx_datetime.h:15
CFX_DateTime::GetYear
int32_t GetYear() const
Definition
cfx_datetime.h:66
CFX_DateTime::Now
static CFX_DateTime Now()
Definition
cfx_datetime.cpp:84
CFX_DateTime::GetSecond
uint8_t GetSecond() const
Definition
cfx_datetime.h:71
CFX_DateTime::GetHour
uint8_t GetHour() const
Definition
cfx_datetime.h:69
CFX_DateTime::GetDay
uint8_t GetDay() const
Definition
cfx_datetime.h:68
CFX_DateTime::GetMinute
uint8_t GetMinute() const
Definition
cfx_datetime.h:70
CFX_DateTime::GetMillisecond
uint16_t GetMillisecond() const
Definition
cfx_datetime.h:72
CFX_DateTime::GetMonth
uint8_t GetMonth() const
Definition
cfx_datetime.h:67
FakeTimeTest
Definition
fake_time_test.h:10
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcrt
cfx_datetime_unittest.cpp
Generated on Sat Sep 21 2024 00:54:59 for Qt by
1.12.0