MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / GetOptions

Method GetOptions

eval/tests/memory_safety_test.cc:87–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 const TestCase& GetTestCase() { return std::get<0>(GetParam()); }
86
87 InterpreterOptions GetOptions() {
88 InterpreterOptions options;
89 options.constant_arena = &arena_;
90
91 switch (std::get<1>(GetParam())) {
92 case Options::kDefault:
93 options.enable_regex_precompilation = false;
94 options.constant_folding = false;
95 options.enable_comprehension_list_append = false;
96 options.enable_comprehension_vulnerability_check = true;
97 options.short_circuiting = true;
98 break;
99 case Options::kExhaustive:
100 options.enable_regex_precompilation = false;
101 options.constant_folding = false;
102 options.enable_comprehension_list_append = false;
103 options.enable_comprehension_vulnerability_check = true;
104 options.short_circuiting = false;
105 break;
106 case Options::kFoldConstants:
107 options.enable_regex_precompilation = true;
108 options.constant_folding = true;
109 options.enable_comprehension_list_append = true;
110 options.enable_comprehension_vulnerability_check = false;
111 options.short_circuiting = true;
112 break;
113 }
114
115 options.enable_qualified_identifier_rewrites =
116 GetTestCase().reference_resolver_enabled;
117
118 return options;
119 }
120
121 google::protobuf::Arena arena_;
122};

Callers 4

OptionalCompilerLibraryFunction · 0.80
TESTFunction · 0.80
AddStandardLibraryMacrosFunction · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected