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

Method Get

common/values/custom_list_value_test.cc:111–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110 private:
111 absl::Status Get(size_t index,
112 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
113 google::protobuf::MessageFactory* absl_nonnull message_factory,
114 google::protobuf::Arena* absl_nonnull arena,
115 Value* absl_nonnull result) const override {
116 if (index == 0) {
117 *result = TrueValue();
118 return absl::OkStatus();
119 }
120 if (index == 1) {
121 *result = IntValue(1);
122 return absl::OkStatus();
123 }
124 *result = IndexOutOfBoundsError(index);
125 return absl::OkStatus();
126 }
127
128 NativeTypeId GetNativeTypeId() const override {
129 return NativeTypeId::For<CustomListValueInterfaceTest>();

Callers 1

TEST_FFunction · 0.45

Calls 3

TrueValueFunction · 0.85
IntValueClass · 0.70
IndexOutOfBoundsErrorFunction · 0.70

Tested by

no test coverage detected