Lines Matching defs:value

38 // statements.  The value returned by the statements will be used as
39 // the return value of the action. Inside the statements, you can
168 // default-constructed T value. BuiltInDefaultValueGetter<T,
187 // BuiltInDefaultValue<T>::Get() returns the "built-in" default value
191 // default-constructed T value if T is default constructible. For any
192 // other type T, the built-in default T value is undefined, and the
198 // value.
199 static bool Exists() { return ::std::is_default_constructible<T>::value; }
203 T, ::std::is_default_constructible<T>::value>::Get();
208 // default value for T and const T.
227 #define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \
232 static type Get() { return value; } \
271 : std::integral_constant<bool, bool(!P::value)> {};
285 : std::conditional<bool(P1::value), conjunction<Ps...>, P1>::type {};
296 : std::conditional<!bool(P1::value), disjunction<Ps...>, P1>::type {};
331 // A function that creates a value of type T.
345 static constexpr bool value = type::value;
363 std::is_void<R>::value, //
456 ::value,
475 IsCompatibleAfterIgnoringArguments<Callable>>::value,
528 // value" error.
560 // let it return a default value if the user has specified one for its
561 // return type, or if the return type has a built-in default value;
562 // otherwise Google Mock won't know what value to return and will have
566 // default value for a type T that is both copyable and publicly
570 // // Sets the default value for type T to be foo.
575 // Sets the default value for type T; requires T to be
582 // Provides a factory function to be called to generate the default value.
591 // Unsets the default value for type T.
597 // Returns true if and only if the user has set the default value for type T.
600 // Returns true if T has a default return value set by the user or there
601 // exists a built-in default value.
606 // Returns the default value for type T if the user has set one;
607 // otherwise returns the built-in default value. Requires that Exists()
608 // is true, which ensures that the return value is well-defined.
623 explicit FixedValueProducer(T value) : value_(value) {}
652 // Sets the default value for type T&.
657 // Unsets the default value for type T&.
660 // Returns true if and only if the user has set the default value for type T&.
663 // Returns true if T has a default return value set by the user or there
664 // exists a built-in default value.
669 // Returns the default value for type T& if the user has set one;
670 // otherwise returns the built-in default value if there is one;
690 // Points to the user-set default value for type T.
694 // Points to the user-set default value for type T&.
764 G>>::value>::type>
861 // the definition of Return(void) and SetArgumentPointee<N>(value) for
918 explicit ByMoveWrapper(T value) : payload(std::move(value)) {}
926 explicit ReturnAction(R value) : value_(std::move(value)) {}
934 std::is_move_constructible<U>>::value>::type>
945 std::is_copy_constructible<U>>::value>::type>
955 // The constructor used when the return value is allowed to move from the
956 // input value (i.e. we are converting to OnceAction).
960 // The constructor used when the return value is not allowed to move from
961 // the input value (i.e. we are converting to Action).
964 U operator()() && { return std::move(state_->value); }
965 U operator()() const& { return state_->value; }
970 // necessary only because we eagerly create State::value (see the note on
971 // that symbol for details). If we instead had only the input value as a
974 // For example, when R is std::string and U is std::string_view, value is a
990 value(ImplicitCast_<U>(internal::as_const(input_value))) {}
997 // before initializing the value.
999 // Unlike above we provide the input value as an rvalue to the
1001 // wants to consume the input value.
1002 value(ImplicitCast_<U>(std::move(input_value))) {}
1004 // A copy of the value originally provided by the user. We retain this in
1005 // addition to the value of the mock function's result type below in case
1010 // The value we actually return, as the type returned by the mock function
1016 // made the Action<U()> conversion operator eagerly convert the R value to
1020 // value-like type such as std::string.
1025 // value-like type U when being implicitly converted. An example of this
1075 U value;
1100 return std::move(state_->value);
1107 explicit State(T&& value_in) : value(std::move(value_in)) {}
1109 T value;
1134 static_assert(std::is_void<Result>::value, "Result should be void.");
1155 static_assert(std::is_reference<Result>::value,
1156 "use Return instead of ReturnRef to return a value");
1187 explicit ReturnRefOfCopyAction(const T& value) : value_(value) {} // NOLINT
1197 static_assert(std::is_reference<Result>::value,
1198 "use Return instead of ReturnRefOfCopy to return a value");
1210 explicit Impl(const T& value) : value_(value) {} // NOLINT
1263 // particular value.
1267 AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {}
1305 A value;
1309 *::std::get<N>(std::tie(args...)) = value;
1376 static_assert(std::is_void<Result>::value, "Result type should be void.");
1434 I, std::tuple<Args...>>...)>>::value,
1461 I, std::tuple<Args...>>...)>>::value,
1494 std::is_convertible<FinalAction, OnceAction<R(Args...)>>::value,
1503 std::is_convertible<const FinalAction&, Action<R(Args...)>>::value,
1526 // * Unlike most forwarding functions, we pass scalars through by value.
1535 // impact, or it might even be impossible, to pass by value.
1561 // to fill in a reference argument and then return a canned value:
1568 typename std::conditional<std::is_scalar<T>::value, T, const T&>::type;
1587 std::is_convertible<Base, OnceAction<R(Args...)>>>::value,
1619 std::is_convertible<const Base&, Action<R(Args...)>>>::value,
1692 T value;
1698 static_assert(std::is_lvalue_reference<argk_type>::value,
1700 std::get<k>(std::tie(args...)) = value;
1711 auto value = std::get<k>(std::tie(args...));
1712 for (auto it = first; it != last; ++it, (void)++value) {
1713 *value = *it;
1750 // An Unused object can be implicitly constructed from ANY value.
1823 // Creates an action that returns a value.
1834 // The mock expectation contains the R value from which the U return value is
1836 // value will survive at least until the mock object's expectations are cleared
1848 internal::ReturnAction<R> Return(R value) {
1849 return internal::ReturnAction<R>(std::move(value));
1892 // repeatedly return the next value from `vals` until it reaches the end and
1900 // repeatedly return the next value from `vals` until it reaches the end and
1914 // (0-based) function argument to 'value'.
1916 internal::SetArgumentPointeeAction<N, T> SetArgPointee(T value) {
1917 return {std::move(value)};
1922 internal::SetArgumentPointeeAction<N, T> SetArgumentPointee(T value) {
1923 return {std::move(value)};
1926 // Creates an action that sets a pointer referent to a given value.
1986 // Creates a reference wrapper for the given L-value. If necessary,
2003 // a1, a2, ..., and a_k. The caller assumes ownership of the returned value.
2023 // Action SaveArgPointee<k>(pointer) saves the value pointed to
2030 // Action SetArgReferee<k>(value) assigns 'value' to the variable
2034 T&& value) {
2035 return {std::forward<T>(value)};
2056 // This action returns the value pointed to by 'pointer'.
2063 // to throw the given exception. Any copyable value can be thrown.
2101 using type = typename std::conditional<std::is_constructible<Impl>::value,