BOOST_FIXTURE_TEST_CASE( read_without_read_access, access_attributes< fixed_without_read_access > ) { const auto attr = attribute_by_type( 0xD0B1 ); std::uint8_t buffer[ 4 ]; auto read = bluetoe::details::attribute_access_arguments::read( buffer, 0 ); BOOST_CHECK( attr.access( read, 1 ) == bluetoe::details::attribute_access_result::read_not_permitted ); }
BOOST_FIXTURE_TEST_CASE( read_only, access_attributes< fixed_32bit > ) { const auto attr = attribute_by_type( 0xD0B1 ); std::uint8_t buffer[ 4 ]; auto write = bluetoe::details::attribute_access_arguments::write( buffer ); BOOST_CHECK( attr.access( write, 1 ) == bluetoe::details::attribute_access_result::write_not_permitted ); }
BOOST_FIXTURE_TEST_CASE( fixed_notifiable_must_have_a_client_characteristic_configuration, access_attributes< fixed_notifiable > ) { attribute_by_type( 0x2902 ); }
BOOST_FIXTURE_TEST_CASE( find_char, access_attributes< fixed_16bit > ) { attribute_by_type( 0xD0B1 ); }
void compare_characteristic( const std::initializer_list< std::uint8_t >& input, std::uint16_t type ) { BOOST_REQUIRE( bluetoe::details::attribute_access_result::success == read_characteristic_impl( input, attribute_by_type( type ) ) ); }