OR-Tools  9.3
enum_sets.h
Go to the documentation of this file.
1// Copyright 2010-2021 Google LLC
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
5//
6// http://www.apache.org/licenses/LICENSE-2.0
7//
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License.
13
14// This header defines sets of enum values that can be used for parametrized
15// tests.
16#ifndef OR_TOOLS_MATH_OPT_VALIDATORS_ENUM_SETS_H_
17#define OR_TOOLS_MATH_OPT_VALIDATORS_ENUM_SETS_H_
18
19#include <string>
20#include <tuple>
21#include <vector>
22
23#include "gtest/gtest.h"
24#include "ortools/math_opt/result.pb.h"
25#include "ortools/math_opt/solution.pb.h"
26
27namespace operations_research {
28namespace math_opt {
29
30// Returns all valid feasibility statuses (i.e does not include UNSPECIFIED).
31std::vector<FeasibilityStatusProto> AllFeasibilityStatuses();
32
33// Returns all valid solution statuses (i.e does not include UNSPECIFIED).
34std::vector<SolutionStatusProto> AllSolutionStatuses();
35
36// Printing utilities for parametrized tests.
37void PrintTo(const SolutionStatusProto& proto, std::ostream* os);
38void PrintTo(const FeasibilityStatusProto& proto, std::ostream* os);
39void PrintTo(const std::tuple<SolutionStatusProto, SolutionStatusProto>& proto,
40 std::ostream* os);
41void PrintTo(
42 const std::tuple<FeasibilityStatusProto, FeasibilityStatusProto>& proto,
43 std::ostream* os);
44void PrintTo(
45 const std::tuple<SolutionStatusProto, FeasibilityStatusProto>& proto,
46 std::ostream* os);
47
48} // namespace math_opt
49} // namespace operations_research
50#endif // OR_TOOLS_MATH_OPT_VALIDATORS_ENUM_SETS_H_
CpModelProto proto
void PrintTo(const Termination &termination, std::ostream *os)
Definition: matchers.cc:78
std::vector< FeasibilityStatusProto > AllFeasibilityStatuses()
Definition: enum_sets.cc:30
std::vector< SolutionStatusProto > AllSolutionStatuses()
Definition: enum_sets.cc:42
Collection of objects used to extend the Constraint Solver library.