diff options
author | Sven Gothel <[email protected]> | 2021-09-14 17:10:48 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-09-15 09:48:24 +0200 |
commit | 5cf888d7acf1b29709bdc25ba2901597f2d56e15 (patch) | |
tree | 741efdfec9860a3236a184ed06cdb0a3a4182c22 /test | |
parent | 3a58b0593ddc62e6f9c0a9e5b0a176282090507a (diff) |
uuid_t: static factory return unique_ptr<uuid_t> (drop const); Have uuid_t as pure virtual; Add clone() and put(..) member; ..
.. and use immutable `const uuid_t` on client side.
EInfoReport::addService(..): Add missing set(EIRDataType::SERVICE_UUID);
EInfoReport::read_data(..): Add `[[fallthrough]]` and add missing break in switch block.
Diffstat (limited to 'test')
-rw-r--r-- | test/direct_bt/test_uuid.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/direct_bt/test_uuid.cpp b/test/direct_bt/test_uuid.cpp index da1abafa..46d06d9a 100644 --- a/test/direct_bt/test_uuid.cpp +++ b/test/direct_bt/test_uuid.cpp @@ -27,7 +27,7 @@ TEST_CASE( "UUID Test 01", "[datatype][uuid]" ) { REQUIRE(v01.getTypeSizeInt() == sizeof(v01.value.data)); REQUIRE( 0 == memcmp(uuid128_bytes, v01.data(), 16) ); - put_uuid(buffer, 0, v01, true); + v01.put(buffer, 0, true /* littleEndian */); std::shared_ptr<const uuid_t> v02 = uuid_t::create(uuid_t::TypeSize::UUID128_SZ, buffer, 0, true); REQUIRE(v02->getTypeSizeInt() == 16); REQUIRE( 0 == memcmp(v01.data(), v02->data(), 16) ); @@ -40,7 +40,7 @@ TEST_CASE( "UUID Test 01", "[datatype][uuid]" ) { REQUIRE(v01.getTypeSizeInt() == sizeof(v01.value)); REQUIRE(0x12345678 == v01.value); - put_uuid(buffer, 0, v01, true); + v01.put(buffer, 0, true /* littleEndian */); std::shared_ptr<const uuid_t> v02 = uuid_t::create(uuid_t::TypeSize::UUID32_SZ, buffer, 0, true); REQUIRE(v02->getTypeSizeInt() == 4); REQUIRE( 0 == memcmp(v01.data(), v02->data(), 4) ); @@ -53,7 +53,7 @@ TEST_CASE( "UUID Test 01", "[datatype][uuid]" ) { REQUIRE(v01.getTypeSizeInt() == sizeof(v01.value)); REQUIRE(0x1234 == v01.value); - put_uuid(buffer, 0, v01, true); + v01.put(buffer, 0, true /* littleEndian */); std::shared_ptr<const uuid_t> v02 = uuid_t::create(uuid_t::TypeSize::UUID16_SZ, buffer, 0, true); REQUIRE(v02->getTypeSizeInt() == 2); REQUIRE( 0 == memcmp(v01.data(), v02->data(), 2) ); |