Go to the documentation of this file.
19 #include "absl/memory/memory.h"
20 #include "gmock/gmock.h"
21 #include "gtest/gtest.h"
46 TEST(ForEachTest, SendThriceWithPipe) {
53 auto sender = std::make_shared<std::unique_ptr<PipeSender<int>>>(
58 Seq((*sender)->Push(1), [sender] { return (*sender)->Push(2); },
59 [sender] { return (*sender)->Push(3); },
62 return absl::OkStatus();
67 [&num_received](
int i) {
69 EXPECT_EQ(num_received, i);
70 return absl::OkStatus();
77 Mock::VerifyAndClearExpectations(&on_done);
83 int main(
int argc,
char** argv) {
ScopedArenaPtr MakeScopedArena(size_t initial_size, MemoryAllocator *memory_allocator)
for_each_detail::ForEach< Reader, Action > ForEach(Reader reader, Action action)
For each item acquired by calling Reader::Next, run the promise Action.
PipeReceiver< T > receiver
ActivityPtr MakeActivity(Factory promise_factory, WakeupScheduler wakeup_scheduler, OnDone on_done, Contexts &&... contexts)
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
static auto * g_memory_allocator
static ResourceQuotaRefPtr Default()
int main(int argc, char **argv)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
#define EXPECT_CALL(obj, call)
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
promise_detail::Map< Promise, Fn > Map(Promise promise, Fn fn)
promise_detail::Seq< Functors... > Seq(Functors... functors)
promise_detail::Join< Promise... > Join(Promise... promises)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:24