Lines Matching refs:result

28   VarInstance result{};  in VarInstanceStubFromSpec()  local
30 result.set_type(var_spec.type()); in VarInstanceStubFromSpec()
36 result.set_name(var_spec.name()); in VarInstanceStubFromSpec()
39 result.set_predefined_type(var_spec.predefined_type()); in VarInstanceStubFromSpec()
41 return result; in VarInstanceStubFromSpec()
45 VarInstance result{VarInstanceStubFromSpec(var_spec)}; in ArrayRandomGen() local
47 result.set_vector_size(vector_size); in ArrayRandomGen()
49 *result.add_vector_value() = this->RandomGen(var_spec.vector_value(0)); in ArrayRandomGen()
51 return result; in ArrayRandomGen()
55 VarInstance result{var_instance}; in ArrayMutate() local
56 size_t vector_size = result.vector_size(); in ArrayMutate()
58 *result.mutable_vector_value(idx) = this->Mutate(result.vector_value(idx)); in ArrayMutate()
59 return result; in ArrayMutate()
63 VarInstance result{VarInstanceStubFromSpec(var_spec)}; in EnumRandomGen() local
65 FindPredefinedType(result.predefined_type()).enum_value(); in EnumRandomGen()
82 *(result.mutable_scalar_value()) = scalar_value; in EnumRandomGen()
83 result.set_scalar_type(scalar_type); in EnumRandomGen()
84 return result; in EnumRandomGen()
93 VarInstance result{VarInstanceStubFromSpec(var_spec)}; in ScalarRandomGen() local
94 result.set_scalar_type(var_spec.scalar_type()); in ScalarRandomGen()
95 (*result.mutable_scalar_value()) = in ScalarRandomGen()
96 RandomGen(result.scalar_value(), result.scalar_type()); in ScalarRandomGen()
97 return result; in ScalarRandomGen()
101 VarInstance result{var_instance}; in ScalarMutate() local
102 (*result.mutable_scalar_value()) = in ScalarMutate()
103 Mutate(result.scalar_value(), result.scalar_type()); in ScalarMutate()
104 return result; in ScalarMutate()
108 VarInstance result{VarInstanceStubFromSpec(var_spec)}; in StringRandomGen() local
119 *result.mutable_string_value() = string_data; in StringRandomGen()
120 return result; in StringRandomGen()
124 VarInstance result{var_instance}; in StringMutate() local
125 string str = result.string_value().message(); in StringMutate()
126 size_t str_size = result.string_value().length(); in StringMutate()
154 result.mutable_string_value()->set_message(str); in StringMutate()
155 result.mutable_string_value()->set_length(str_size); in StringMutate()
156 return result; in StringMutate()
160 VarInstance result{VarInstanceStubFromSpec(var_spec)}; in StructRandomGen() local
161 const TypeSpec &blueprint = FindPredefinedType(result.predefined_type()); in StructRandomGen()
163 *result.add_struct_value() = this->RandomGen(struct_value); in StructRandomGen()
165 return result; in StructRandomGen()
169 VarInstance result{var_instance}; in StructMutate() local
170 size_t size = result.struct_value_size(); in StructMutate()
172 *result.mutable_struct_value(idx) = this->Mutate(result.struct_value(idx)); in StructMutate()
173 return result; in StructMutate()
177 VarInstance result{VarInstanceStubFromSpec(var_spec)}; in UnionRandomGen() local
178 const TypeSpec &blueprint = FindPredefinedType(result.predefined_type()); in UnionRandomGen()
181 result.add_union_value(); in UnionRandomGen()
184 *result.mutable_union_value(idx) = in UnionRandomGen()
186 return result; in UnionRandomGen()
190 VarInstance result{var_instance}; in UnionMutate() local
191 size_t size = result.union_value_size(); in UnionMutate()
193 if (result.union_value(i).has_name()) { in UnionMutate()
194 *result.mutable_union_value(i) = this->Mutate(result.union_value(i)); in UnionMutate()
197 return result; in UnionMutate()
201 VarInstance result{VarInstanceStubFromSpec(var_spec)}; in VectorRandomGen() local
204 *result.add_vector_value() = this->RandomGen(var_spec.vector_value(0)); in VectorRandomGen()
206 return result; in VectorRandomGen()
210 VarInstance result{var_instance}; in VectorMutate() local
211 size_t size = result.vector_size(); in VectorMutate()
213 *result.mutable_vector_value(idx) = this->Mutate(result.vector_value(idx)); in VectorMutate()
214 return result; in VectorMutate()
219 ScalarData result{}; in RandomGen() local
222 result.set_bool_t(RandomGen(static_cast<bool>(scalar_value.bool_t()))); in RandomGen()
224 result.set_int8_t(RandomGen(scalar_value.int8_t())); in RandomGen()
226 result.set_uint8_t(RandomGen(scalar_value.uint8_t())); in RandomGen()
228 result.set_int16_t(RandomGen(scalar_value.int16_t())); in RandomGen()
230 result.set_uint16_t(RandomGen(scalar_value.uint16_t())); in RandomGen()
232 result.set_int32_t(RandomGen(scalar_value.int32_t())); in RandomGen()
234 result.set_uint32_t(RandomGen(scalar_value.uint32_t())); in RandomGen()
236 result.set_int64_t(RandomGen(scalar_value.int64_t())); in RandomGen()
238 result.set_uint64_t(RandomGen(scalar_value.uint64_t())); in RandomGen()
240 result.set_float_t(RandomGen(scalar_value.float_t())); in RandomGen()
242 result.set_double_t(RandomGen(scalar_value.double_t())); in RandomGen()
247 return result; in RandomGen()
252 ScalarData result{}; in Mutate() local
255 result.set_bool_t(Mutate(static_cast<bool>(scalar_value.bool_t()))); in Mutate()
257 result.set_int8_t(Mutate(scalar_value.int8_t())); in Mutate()
259 result.set_uint8_t(Mutate(scalar_value.uint8_t())); in Mutate()
261 result.set_int16_t(Mutate(scalar_value.int16_t())); in Mutate()
263 result.set_uint16_t(Mutate(scalar_value.uint16_t())); in Mutate()
265 result.set_int32_t(Mutate(scalar_value.int32_t())); in Mutate()
267 result.set_uint32_t(Mutate(scalar_value.uint32_t())); in Mutate()
269 result.set_int64_t(Mutate(scalar_value.int64_t())); in Mutate()
271 result.set_uint64_t(Mutate(scalar_value.uint64_t())); in Mutate()
273 result.set_float_t(Mutate(scalar_value.float_t())); in Mutate()
275 result.set_double_t(Mutate(scalar_value.double_t())); in Mutate()
280 return result; in Mutate()
288 T result; in RandomGen() local
289 memcpy(&result, &rand_int, sizeof(T)); in RandomGen()
290 return result; in RandomGen()