MCPcopy Create free account
hub / github.com/apache/thrift / testChildService

Function testChildService

lib/cpp/test/processor/ProcessorTest.cpp:449–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447
448template <typename State_>
449void testChildService(const std::shared_ptr<State_>& state) {
450 std::shared_ptr<typename State_::Client> client = state->createClient();
451
452 // Test calling some of the parent methids via the a child client
453 int32_t gen = client->getGeneration();
454 int32_t newGen = client->incrementGeneration();
455 BOOST_CHECK_EQUAL(gen + 1, newGen);
456 newGen = client->getGeneration();
457 BOOST_CHECK_EQUAL(gen + 1, newGen);
458
459 // Test some of the child methods
460 client->setValue(10);
461 BOOST_CHECK_EQUAL(10, client->getValue());
462 BOOST_CHECK_EQUAL(10, client->setValue(99));
463 BOOST_CHECK_EQUAL(99, client->getValue());
464}
465
466template <typename ServerTraits, typename TemplateTraits>
467void testBasicService() {

Callers 1

testInheritedServiceFunction · 0.85

Calls 5

getValueMethod · 0.65
createClientMethod · 0.45
getGenerationMethod · 0.45
incrementGenerationMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected