Android-cuttlefish cvd tool
files_test_helper.h
Go to the documentation of this file.
1//
2// Copyright (C) 2023 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <optional>
19#include <string>
20
21#include <gtest/gtest.h>
22
24
25namespace cuttlefish {
26
28 std::string path_to_convert_;
29 std::string working_dir_;
30 std::string home_dir_;
31 std::string expected_;
32};
33
34class EmulateAbsolutePathBase : public testing::TestWithParam<InputOutput> {
35 protected:
37
38 std::string input_path_;
39 std::string expected_path_;
40};
41
42class EmulateAbsolutePathWithPwd : public testing::TestWithParam<InputOutput> {
43 protected:
45
46 std::string input_path_;
47 std::string current_dir_;
48 std::string expected_path_;
49};
50
52 protected:
54
55 std::string input_path_;
56 std::string home_dir_;
57 std::string expected_path_;
58};
59
60} // namespace cuttlefish
Definition: files_test_helper.h:34
std::string expected_path_
Definition: files_test_helper.h:39
EmulateAbsolutePathBase()
Definition: files_test_helper.cpp:20
std::string input_path_
Definition: files_test_helper.h:38
Definition: files_test_helper.h:51
std::string home_dir_
Definition: files_test_helper.h:56
EmulateAbsolutePathWithHome()
Definition: files_test_helper.cpp:31
std::string input_path_
Definition: files_test_helper.h:55
std::string expected_path_
Definition: files_test_helper.h:57
Definition: files_test_helper.h:42
std::string expected_path_
Definition: files_test_helper.h:48
std::string input_path_
Definition: files_test_helper.h:46
std::string current_dir_
Definition: files_test_helper.h:47
EmulateAbsolutePathWithPwd()
Definition: files_test_helper.cpp:25
Definition: alloc_utils.cpp:23
Definition: files_test_helper.h:27
std::string home_dir_
Definition: files_test_helper.h:30
std::string working_dir_
Definition: files_test_helper.h:29
std::string expected_
Definition: files_test_helper.h:31
std::string path_to_convert_
Definition: files_test_helper.h:28