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

Function FromNumber

extensions/sets_functions_benchmark_test.cc:58–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56enum class ListImpl : int { kLegacy = 0, kWrappedModern = 1, kRhsConstant = 2 };
57int ToNumber(ListImpl impl) { return static_cast<int>(impl); }
58ListImpl FromNumber(int number) {
59 switch (number) {
60 case 0:
61 return ListImpl::kLegacy;
62 case 1:
63 return ListImpl::kWrappedModern;
64 case 2:
65 return ListImpl::kRhsConstant;
66 default:
67 return ListImpl::kLegacy;
68 }
69}
70
71struct TestCase {
72 std::string test_name;

Calls

no outgoing calls

Tested by

no test coverage detected