OR-Tools  9.6
enum_sets.h
Go to the documentation of this file.
1 // Copyright 2010-2022 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 <ostream>
20 #include <string>
21 #include <tuple>
22 #include <vector>
23 
24 #include "gtest/gtest.h"
25 #include "ortools/math_opt/result.pb.h"
26 #include "ortools/math_opt/solution.pb.h"
27 
28 namespace operations_research {
29 namespace math_opt {
30 
31 // Returns all valid feasibility statuses (i.e does not include UNSPECIFIED).
32 std::vector<FeasibilityStatusProto> AllFeasibilityStatuses();
33 
34 // Returns all valid solution statuses (i.e does not include UNSPECIFIED).
35 std::vector<SolutionStatusProto> AllSolutionStatuses();
36 
37 // Printing utilities for parametrized tests.
38 void PrintTo(const SolutionStatusProto& proto, std::ostream* os);
39 void PrintTo(const FeasibilityStatusProto& proto, std::ostream* os);
40 void PrintTo(const std::tuple<SolutionStatusProto, SolutionStatusProto>& proto,
41  std::ostream* os);
42 void PrintTo(
43  const std::tuple<FeasibilityStatusProto, FeasibilityStatusProto>& proto,
44  std::ostream* os);
45 void PrintTo(
46  const std::tuple<SolutionStatusProto, FeasibilityStatusProto>& proto,
47  std::ostream* os);
48 
49 } // namespace math_opt
50 } // namespace operations_research
51 #endif // OR_TOOLS_MATH_OPT_VALIDATORS_ENUM_SETS_H_
CpModelProto proto
void PrintTo(const Termination &termination, std::ostream *os)
Definition: matchers.cc:83
std::vector< FeasibilityStatusProto > AllFeasibilityStatuses()
Definition: enum_sets.cc:31
std::vector< SolutionStatusProto > AllSolutionStatuses()
Definition: enum_sets.cc:43
Collection of objects used to extend the Constraint Solver library.