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
fake_time_test.cpp
Go to the documentation of this file.
1
// Copyright 2022 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/fake_time_test.h"
6
7
#
include
"core/fxcrt/fx_extension.h"
8
9
void
FakeTimeTest
::
SetUp
() {
10
// Arbitrary, picked descending digits, 2020-04-23 15:05:21.
11
FXSYS_SetTimeFunction
(
[]() -> time_t {
return
1587654321; }
)
;
12
FXSYS_SetLocaltimeFunction
(
[](
const
time_t* t) {
return
gmtime(t); }
)
;
13
}
14
15
void
FakeTimeTest
::
TearDown
() {
16
FXSYS_SetTimeFunction
(
nullptr
)
;
17
FXSYS_SetLocaltimeFunction
(
nullptr
)
;
18
}
FakeTimeTest
Definition
fake_time_test.h:10
FakeTimeTest::TearDown
void TearDown() override
Definition
fake_time_test.cpp:15
FakeTimeTest::SetUp
void SetUp() override
Definition
fake_time_test.cpp:9
FXSYS_SetTimeFunction
void FXSYS_SetTimeFunction(time_t(*func)())
Definition
fx_extension.cpp:168
FXSYS_SetLocaltimeFunction
void FXSYS_SetLocaltimeFunction(struct tm *(*func)(const time_t *))
Definition
fx_extension.cpp:172
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcrt
fake_time_test.cpp
Generated on Thu Nov 14 2024 00:58:38 for Qt by
1.12.0