KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_coroutine.cpp File Reference

Test suite for coroutines. More...

Go to the source code of this file.

Classes

struct  COROUTINE_TEST_EVENT
 An event in a simple coroutine harness. More...
 
class  COROUTINE_INCREMENTING_HARNESS
 Simple coroutine harness that runs a coroutine that increments a number up to a pre-set limit, spitting out coroutine events as it goes. More...
 

Functions

std::ostream & boost_test_print_type (std::ostream &os, const COROUTINE_TEST_EVENT &aObj)
 Define a stream function for logging this type.
 
 BOOST_AUTO_TEST_CASE (Increment)
 Declare the test suite.
 

Detailed Description

Test suite for coroutines.

See also the coroutine utility in qa/common_tools for a command line test utility.

Definition in file test_coroutine.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( Increment  )

Declare the test suite.

A basic test to repeatedly call a coroutine and check that it yields values as expected.

Definition at line 147 of file test_coroutine.cpp.

References COROUTINE_INCREMENTING_HARNESS::Run().

◆ boost_test_print_type()

std::ostream & boost_test_print_type ( std::ostream &  os,
const COROUTINE_TEST_EVENT aObj 
)

Define a stream function for logging this type.

Definition at line 71 of file test_coroutine.cpp.

References COROUTINE_TEST_EVENT::m_type, and COROUTINE_TEST_EVENT::m_value.