FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GitHub Viewer

// Copyright Sebastian Jeckel 2014. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #pragma once #include #include #include "gtest/gtest.h" #include "react/Domain.h" #include "react/Event.h" /////////////////////////////////////////////////////////////////////////////////////////////////// namespace { using namespace react; /////////////////////////////////////////////////////////////////////////////////////////////////// /// EventStreamTest fixture /////////////////////////////////////////////////////////////////////////////////////////////////// template class EventStreamTest : public testing::Test { public: template class MyEngine : public TParams::template EngineT {}; REACTIVE_DOMAIN(MyDomain, TParams::mode, MyEngine) }; TYPED_TEST_CASE_P(EventStreamTest); /////////////////////////////////////////////////////////////////////////////////////////////////// /// EventSources test /////////////////////////////////////////////////////////////////////////////////////////////////// TYPED_TEST_P(EventStreamTest, EventSources) { using D = typename EventSources::MyDomain; auto es1 = MakeEventSource(); auto es2 = MakeEventSource(); std::queue results1; std::queue results2; Observe(es1, [&] (int v) { results1.push(v); }); Observe(es2, [&] (int v) { results2.push(v); }); es1

Back | FazBrowse Home | New Git URL