diff options
Diffstat (limited to 'googlemock/include/gmock/gmock-more-actions.h')
-rw-r--r-- | googlemock/include/gmock/gmock-more-actions.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/googlemock/include/gmock/gmock-more-actions.h b/googlemock/include/gmock/gmock-more-actions.h index 3d387b6..5c6dc8b 100644 --- a/googlemock/include/gmock/gmock-more-actions.h +++ b/googlemock/include/gmock/gmock-more-actions.h @@ -26,13 +26,14 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // // This file implements some actions that depend on gmock-generated-actions.h. +// GOOGLETEST_CM0002 DO NOT DELETE + #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_ #define GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_ @@ -161,7 +162,7 @@ WithArg(const InnerAction& action) { ACTION_TEMPLATE(ReturnArg, HAS_1_TEMPLATE_PARAMS(int, k), AND_0_VALUE_PARAMS()) { - return ::testing::get<k>(args); + return ::std::get<k>(args); } // Action SaveArg<k>(pointer) saves the k-th (0-based) argument of the @@ -169,7 +170,7 @@ ACTION_TEMPLATE(ReturnArg, ACTION_TEMPLATE(SaveArg, HAS_1_TEMPLATE_PARAMS(int, k), AND_1_VALUE_PARAMS(pointer)) { - *pointer = ::testing::get<k>(args); + *pointer = ::std::get<k>(args); } // Action SaveArgPointee<k>(pointer) saves the value pointed to @@ -177,7 +178,7 @@ ACTION_TEMPLATE(SaveArg, ACTION_TEMPLATE(SaveArgPointee, HAS_1_TEMPLATE_PARAMS(int, k), AND_1_VALUE_PARAMS(pointer)) { - *pointer = *::testing::get<k>(args); + *pointer = *::std::get<k>(args); } // Action SetArgReferee<k>(value) assigns 'value' to the variable @@ -185,13 +186,13 @@ ACTION_TEMPLATE(SaveArgPointee, ACTION_TEMPLATE(SetArgReferee, HAS_1_TEMPLATE_PARAMS(int, k), AND_1_VALUE_PARAMS(value)) { - typedef typename ::testing::tuple_element<k, args_type>::type argk_type; + typedef typename ::std::tuple_element<k, args_type>::type argk_type; // Ensures that argument #k is a reference. If you get a compiler // error on the next line, you are using SetArgReferee<k>(value) in // a mock function whose k-th (0-based) argument is not a reference. GTEST_COMPILE_ASSERT_(internal::is_reference<argk_type>::value, SetArgReferee_must_be_used_with_a_reference_argument); - ::testing::get<k>(args) = value; + ::std::get<k>(args) = value; } // Action SetArrayArgument<k>(first, last) copies the elements in @@ -204,9 +205,9 @@ ACTION_TEMPLATE(SetArrayArgument, AND_2_VALUE_PARAMS(first, last)) { // Visual Studio deprecates ::std::copy, so we use our own copy in that case. #ifdef _MSC_VER - internal::CopyElements(first, last, ::testing::get<k>(args)); + internal::CopyElements(first, last, ::std::get<k>(args)); #else - ::std::copy(first, last, ::testing::get<k>(args)); + ::std::copy(first, last, ::std::get<k>(args)); #endif } @@ -215,7 +216,7 @@ ACTION_TEMPLATE(SetArrayArgument, ACTION_TEMPLATE(DeleteArg, HAS_1_TEMPLATE_PARAMS(int, k), AND_0_VALUE_PARAMS()) { - delete ::testing::get<k>(args); + delete ::std::get<k>(args); } // This action returns the value pointed to by 'pointer'. |