From 2c92bdc7c2f8e65198af61a0611d90a55312ee82 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 11 Jun 2020 09:56:29 -0700 Subject: Export of internal Abseil changes -- e21e960918678629abf89ad1b694b7d4a456b434 by Greg Falcon : Roll back invoke() change due to large increases in compiler memory usage. PiperOrigin-RevId: 315919455 -- f95872e1e1d7afdefbac94f42ea228d42d80eb6e by Greg Falcon : Rollback of invoke() changes due to compiler memory usage growth PiperOrigin-RevId: 315911585 -- 6c6c6ba6892016a2ce4703042800254fb9b15727 by Laramie Leavitt : Move some of the common mocking code into MockHelpers. Use MockHelpers to do mock signature detection and improve the dispatch mechansim. PiperOrigin-RevId: 315825988 -- 5e9380367d280c7fa6dbd4d0f48c31ade7f1d419 by Greg Falcon : Rename the internal implementation details Invoke and InvokeT to `invoke` and `invoke_result_t`, since these are re-implementations of C++17 library entites of the same names. PiperOrigin-RevId: 315790467 GitOrigin-RevId: e21e960918678629abf89ad1b694b7d4a456b434 Change-Id: Ia75011f94cb033c1c9a4cb64cf14d283b91426ac --- absl/functional/bind_front_test.cc | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'absl/functional') diff --git a/absl/functional/bind_front_test.cc b/absl/functional/bind_front_test.cc index 92b6e8e5..4801a81c 100644 --- a/absl/functional/bind_front_test.cc +++ b/absl/functional/bind_front_test.cc @@ -228,23 +228,4 @@ TEST(BindTest, Mangling) { absl::bind_front(ManglingCall{}, 1, 3.3)("A"); } -struct Adder { - int add(int v2) const { return v + v2; } - int v; -}; - -TEST(BindTest, InvokeSemantics) { - Struct s1 = {"value"}; - auto f1 = absl::bind_front(&Struct::value); - EXPECT_EQ(f1(s1), "value"); - EXPECT_EQ(f1(&s1), "value"); - EXPECT_EQ(f1(std::ref(s1)), "value"); - - Adder add_100 = {100}; - auto f2 = absl::bind_front(&Adder::add); - EXPECT_EQ(f2(add_100, 23), 123); - EXPECT_EQ(f2(&add_100, 45), 145); - EXPECT_EQ(f2(std::ref(add_100), 67), 167); -} - } // namespace -- cgit v1.2.3