tests/link_layer/ll_connection_tests.cpp
BOOST_FIXTURE_TEST_CASE( channel_map_request_within_timeout, channel_map_request_with_one_timeout_fixture )
{
    ll_empty_pdu(); // event 3
    add_connection_event_respond_timeout();
    ll_empty_pdu(); // event 5; here the map change is applied
    ll_empty_pdu();

    run();

    static constexpr unsigned expected_hop_sequence[] = {
        10, 20, 30, 3, 13, // connection event 0-4
        36, 36
    };

    for ( unsigned i = 0; i != sizeof( expected_hop_sequence ) / sizeof( expected_hop_sequence[ 0 ] ); ++i )
    {
        BOOST_CHECK_EQUAL( connection_events().at( i ).channel, expected_hop_sequence[ i ] );
    }
}
/*
 * This test should make sure that even when the map change is to be applied on an event, where a timeout
 * occures, that the map change is applied correctly
 */
This test should make sure that even when the map change is to be applied on an event, where a timeout
occures, that the map change is applied correctly
This test should make sure that even when the map change is to be applied on an event where a timeout occures that the map change is applied correctly
BOOST_FIXTURE_TEST_CASE( channel_map_request_within_timeout, channel_map_request_with_one_timeout_fixture )
{
    ll_empty_pdu(); 
    add_connection_event_respond_timeout();
    ll_empty_pdu(); 
    ll_empty_pdu();
    run();
    static constexpr unsigned expected_hop_sequence[] = {
        10, 20, 30, 3, 13, 
        36, 36
    };
    for ( unsigned i = 0; i != sizeof( expected_hop_sequence ) / sizeof( expected_hop_sequence[ 0 ] ); ++i )
    {
        BOOST_CHECK_EQUAL( connection_events().at( i ).channel, expected_hop_sequence[ i ] );
    }
}
BOOST_FIXTURE_TEST_CASE ( channel_map_request_within_timeout , channel_map_request_with_one_timeout_fixture ) { ll_empty_pdu ( ) ; add_connection_event_respond_timeout ( ) ; ll_empty_pdu ( ) ; ll_empty_pdu ( ) ; run ( ) ; static constexpr unsigned expected_hop_sequence [ ] = { 10 , 20 , 30 , 3 , 13 , 36 , 36 } ; for ( unsigned i = 0 ; i != sizeof ( expected_hop_sequence ) / sizeof ( expected_hop_sequence [ 0 ] ) ; ++ i ) { BOOST_CHECK_EQUAL ( connection_events ( ) . at ( i ) . channel , expected_hop_sequence [ i ] ) ; } }
This test should make sure that even when the map change is to be applied on an event, where a timeout
 occures, that the map change is applied correctly
This test should make sure that even when the map change is to be applied on an event where a timeout occures that the map change is applied correctly
// event 3 // event 5; here the map change is applied // connection event 0-4