blob: 93bac190e437fc3959db530b0aa228d5f77aa942 [file] [log] [blame]
Tom Sepez22818532020-07-22 20:40:56 +00001// Copyright 2020 PDFium Authors. All rights reserved.
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 "testing/pdf_test_environment.h"
6
7#include "core/fxge/cfx_gemodule.h"
Tom Anderson1d91b812021-11-18 01:37:22 +00008#include "testing/gtest/include/gtest/gtest.h"
Tom Anderson331f3eb2021-10-22 00:49:44 +00009#include "testing/utils/path_service.h"
Tom Sepez22818532020-07-22 20:40:56 +000010
11PDFTestEnvironment::PDFTestEnvironment() = default;
12
13PDFTestEnvironment::~PDFTestEnvironment() = default;
14
15// testing::Environment:
16void PDFTestEnvironment::SetUp() {
Tom Anderson1d91b812021-11-18 01:37:22 +000017 ASSERT_TRUE(PathService::GetExecutableDir(&font_path_));
18 font_path_.push_back(PATH_SEPARATOR);
19 font_path_.append("test_fonts");
20 font_paths_[0] = font_path_.c_str();
21 font_paths_[1] = nullptr;
22 CFX_GEModule::Create(font_paths_);
Tom Sepez22818532020-07-22 20:40:56 +000023}
24
25void PDFTestEnvironment::TearDown() {
26 CFX_GEModule::Destroy();
27}