Android-cuttlefish cvd tool
parser_names_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::optional<std::vector<std::string>> names;
31 std::optional<std::string> group_name;
32 std::optional<std::vector<std::string>> per_instance_names;
33};
34
35struct InputOutput {
36 std::string input;
38};
39
40class ValidNamesTest : public testing::TestWithParam<InputOutput> {
41 protected:
43 void Init();
44
47};
48
49class InvalidNamesTest : public testing::TestWithParam<std::string> {
50 protected:
52
54};
55
56} // namespace selector
57} // namespace cuttlefish
Definition: parser_names_helper.h:49
InvalidNamesTest()
Definition: parser_names_helper.cpp:34
cvd_common::Args selector_args_
Definition: parser_names_helper.h:53
Definition: parser_names_helper.h:40
ExpectedOutput expected_output_
Definition: parser_names_helper.h:46
ValidNamesTest()
Definition: parser_names_helper.cpp:26
void Init()
Definition: parser_names_helper.cpp:28
cvd_common::Args selector_args_
Definition: parser_names_helper.h:45
std::vector< std::string > Args
Definition: types.h:25
Definition: alloc_utils.cpp:23
Definition: parser_names_helper.h:29
std::optional< std::string > group_name
Definition: parser_names_helper.h:31
std::optional< std::vector< std::string > > names
Definition: parser_names_helper.h:30
std::optional< std::vector< std::string > > per_instance_names
Definition: parser_names_helper.h:32
Definition: creation_analyzer_helper.h:46
ExpectedOutput expected
Definition: parser_names_helper.h:37
std::string input
Definition: parser_names_helper.h:36