Android-cuttlefish cvd tool
parser_ids_helper.h
Go to the documentation of this file.
1//
2// Copyright (C) 2022 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#include <vector>
21
22#include <gtest/gtest.h>
23
25
26namespace cuttlefish {
27namespace selector {
28
30 std::string cmd_args;
31 std::string selector_args;
32 std::optional<std::string> cuttlefish_instance;
33 std::optional<std::vector<unsigned>> expected_ids;
36};
37
38class InstanceIdTest : public testing::TestWithParam<InstanceIdTestInput> {
39 protected:
41
44 std::optional<std::vector<unsigned>> expected_ids_;
48};
49
50} // namespace selector
51} // namespace cuttlefish
Definition: parser_ids_helper.h:38
InstanceIdTest()
Definition: parser_ids_helper.cpp:28
cvd_common::Envs envs_
Definition: parser_ids_helper.h:47
cvd_common::Args selector_args_
Definition: parser_ids_helper.h:46
cvd_common::Args cmd_args_
Definition: parser_ids_helper.h:45
bool expected_result_
Definition: parser_ids_helper.h:42
unsigned requested_num_instances_
Definition: parser_ids_helper.h:43
std::optional< std::vector< unsigned > > expected_ids_
Definition: parser_ids_helper.h:44
std::vector< std::string > Args
Definition: types.h:25
std::unordered_map< std::string, std::string > Envs
Definition: types.h:26
Definition: alloc_utils.cpp:23
Definition: parser_ids_helper.h:29
unsigned requested_num_instances
Definition: parser_ids_helper.h:34
std::optional< std::vector< unsigned > > expected_ids
Definition: parser_ids_helper.h:33
bool expected_result
Definition: parser_ids_helper.h:35
std::optional< std::string > cuttlefish_instance
Definition: parser_ids_helper.h:32
std::string selector_args
Definition: parser_ids_helper.h:31
std::string cmd_args
Definition: parser_ids_helper.h:30