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 SetUp()9void 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 TearDown()15void FakeTimeTest::TearDown() { 16 FXSYS_SetTimeFunction(nullptr); 17 FXSYS_SetLocaltimeFunction(nullptr); 18 } 19