Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f189da44 authored by Katherine Lai's avatar Katherine Lai
Browse files

[Floss] Add and fix btstack unit tests

Add system/gd/rust/linux/stack to Cargo file and fix advertising
unit tests.

Bug: 287248056
Tag: #floss
Test: ./build.py --target test
Change-Id: Ibeef79e5ceeb2866bd7fb61776001a6a54e42015
parent 72d91289
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ default-members = [
  "system/gd/rust/topshim",
  "system/gd/rust/linux/mgmt",
  "system/gd/rust/linux/service",
  "system/gd/rust/linux/stack",
  "system/gd/rust/linux/client",
]

@@ -28,6 +29,7 @@ members = [
  "system/gd/rust/topshim",
  "system/gd/rust/linux/mgmt",
  "system/gd/rust/linux/service",
  "system/gd/rust/linux/stack",
  "system/gd/rust/linux/client",
  "floss/hcidoc",
]
+2 −2
Original line number Diff line number Diff line
@@ -676,7 +676,7 @@ mod tests {
    fn test_new_advising_set_info() {
        let mut uniq = HashSet::new();
        for callback_id in 0..256 {
            let s = AdvertisingSetInfo::new(callback_id, 0, 0);
            let s = AdvertisingSetInfo::new(callback_id, 0, 0, false);
            assert_eq!(s.callback_id(), callback_id);
            assert_eq!(uniq.insert(s.reg_id()), true);
        }
@@ -691,7 +691,7 @@ mod tests {
        for i in 0..size {
            let callback_id: CallbackId = i as CallbackId;
            let adv_id: AdvertiserId = i as AdvertiserId;
            let mut s = AdvertisingSetInfo::new(callback_id, 0, 0);
            let mut s = AdvertisingSetInfo::new(callback_id, 0, 0, false);
            s.set_adv_id(Some(adv_id));
            advertisers.add(s);
        }