Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_modules_Bluetooth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_modules_Bluetooth
Commits
5434951e
Commit
5434951e
authored
1 year ago
by
Himanshu Rawat
Committed by
Gerrit Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Rename tTypedAddressTransport to tAclLinkSpec" into main
parents
327af4e8
abbcef84
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
system/types/ble_address_with_type.h
+4
-6
4 additions, 6 deletions
system/types/ble_address_with_type.h
system/types/test/ble_address_with_type_unittest.cc
+12
-12
12 additions, 12 deletions
system/types/test/ble_address_with_type_unittest.cc
with
16 additions
and
18 deletions
system/types/ble_address_with_type.h
+
4
−
6
View file @
5434951e
...
@@ -151,11 +151,11 @@ struct std::hash<tBLE_BD_ADDR> {
...
@@ -151,11 +151,11 @@ struct std::hash<tBLE_BD_ADDR> {
}
}
};
};
struct
t
TypedAddressTransport
{
struct
t
AclLinkSpec
{
tBLE_BD_ADDR
addrt
;
tBLE_BD_ADDR
addrt
;
tBT_TRANSPORT
transport
;
tBT_TRANSPORT
transport
;
bool
operator
==
(
const
t
TypedAddressTransport
rhs
)
const
{
bool
operator
==
(
const
t
AclLinkSpec
rhs
)
const
{
if
(
rhs
.
addrt
!=
addrt
)
return
false
;
if
(
rhs
.
addrt
!=
addrt
)
return
false
;
if
(
rhs
.
transport
==
BT_TRANSPORT_AUTO
||
transport
==
BT_TRANSPORT_AUTO
)
{
if
(
rhs
.
transport
==
BT_TRANSPORT_AUTO
||
transport
==
BT_TRANSPORT_AUTO
)
{
...
@@ -165,11 +165,9 @@ struct tTypedAddressTransport {
...
@@ -165,11 +165,9 @@ struct tTypedAddressTransport {
return
rhs
.
transport
==
transport
;
return
rhs
.
transport
==
transport
;
}
}
bool
operator
!=
(
const
tTypedAddressTransport
rhs
)
const
{
bool
operator
!=
(
const
tAclLinkSpec
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
return
!
(
*
this
==
rhs
);
}
bool
StrictlyEquals
(
const
t
TypedAddressTransport
rhs
)
const
{
bool
StrictlyEquals
(
const
t
AclLinkSpec
rhs
)
const
{
return
rhs
.
addrt
==
addrt
&&
rhs
.
transport
==
transport
;
return
rhs
.
addrt
==
addrt
&&
rhs
.
transport
==
transport
;
}
}
...
...
This diff is collapsed.
Click to expand it.
system/types/test/ble_address_with_type_unittest.cc
+
12
−
12
View file @
5434951e
...
@@ -100,20 +100,20 @@ TEST(BleAddressWithTypeTest, STREAM_TO_BLE_ADDR_TYPE) {
...
@@ -100,20 +100,20 @@ TEST(BleAddressWithTypeTest, STREAM_TO_BLE_ADDR_TYPE) {
}
}
TEST
(
BleAddressWithTypeTest
,
TYPED_ADDRESS_TRANSPORT
)
{
TEST
(
BleAddressWithTypeTest
,
TYPED_ADDRESS_TRANSPORT
)
{
t
TypedAddressTransport
typedAddressTransportA
=
{
t
AclLinkSpec
linkSpecA
=
{{
BLE_ADDR_PUBLIC
,
RAW_ADDRESS_TEST1
},
{
BLE_ADDR_PUBLIC
,
RAW_ADDRESS_TEST1
},
BT_TRANSPORT_AUTO
};
BT_TRANSPORT_AUTO
};
t
TypedAddressTransport
typedAddressTransportB
=
{
t
AclLinkSpec
linkSpecB
=
{{
BLE_ADDR_PUBLIC
,
RAW_ADDRESS_TEST1
},
{
BLE_ADDR_PUBLIC
,
RAW_ADDRESS_TEST1
},
BT_TRANSPORT_BR_EDR
};
BT_TRANSPORT_BR_EDR
};
t
TypedAddressTransport
typedAddressTransportC
=
{
t
AclLinkSpec
linkSpecC
=
{{
BLE_ADDR_PUBLIC
,
RAW_ADDRESS_TEST1
},
{
BLE_ADDR_PUBLIC
,
RAW_ADDRESS_TEST1
},
BT_TRANSPORT_LE
};
BT_TRANSPORT_LE
};
ASSERT_EQ
(
typedAddressTransportA
,
typedAddressTransport
B
);
ASSERT_EQ
(
linkSpecA
,
linkSpec
B
);
ASSERT_EQ
(
typedAddressTransportA
,
typedAddressTransport
C
);
ASSERT_EQ
(
linkSpecA
,
linkSpec
C
);
ASSERT_NE
(
typedAddressTransportB
,
typedAddressTransport
C
);
ASSERT_NE
(
linkSpecB
,
linkSpec
C
);
ASSERT_FALSE
(
typedAddressTransportA
.
StrictlyEquals
(
typedAddressTransport
B
));
ASSERT_FALSE
(
linkSpecA
.
StrictlyEquals
(
linkSpec
B
));
ASSERT_FALSE
(
typedAddressTransportA
.
StrictlyEquals
(
typedAddressTransport
C
));
ASSERT_FALSE
(
linkSpecA
.
StrictlyEquals
(
linkSpec
C
));
ASSERT_FALSE
(
typedAddressTransportB
.
StrictlyEquals
(
typedAddressTransport
C
));
ASSERT_FALSE
(
linkSpecB
.
StrictlyEquals
(
linkSpec
C
));
}
}
TEST
(
BleAddressWithTypeTest
,
BLE_ADDR_TYPE_TO_STREAM
)
{
TEST
(
BleAddressWithTypeTest
,
BLE_ADDR_TYPE_TO_STREAM
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment