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

Commit f2b80abe authored by Jack He's avatar Jack He
Browse files

GD: Fix DeviceTest

* Do not assert on crash message

Bug: 188742121
Fixes: 188742121
Test: atest bluetooth_test_gd
Tag: #gd-refactor

Change-Id: I859edea07e083912ca09cc0303551fca35b9c097
parent 5cce5ff0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ using bluetooth::storage::ConfigCache;
using bluetooth::storage::Device;
using bluetooth::storage::Mutation;
using ::testing::Eq;
using ::testing::MatchesRegex;
using ::testing::Optional;
using ::testing::StrEq;

@@ -146,8 +147,8 @@ TEST(DeviceTest, get_le_and_bredr) {
  Address address = {{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}};
  Device device(&config, &memory_only_config, address, Device::ConfigKeyAddressType::LEGACY_KEY_ADDRESS);
  ASSERT_FALSE(device.GetDeviceType());
  ASSERT_DEATH({ device.Le(); }, "device_type == DeviceType::LE || device_type == DeviceType::DUAL");
  ASSERT_DEATH({ device.Classic(); }, "device_type == DeviceType::BR_EDR || device_type == DeviceType::DUAL");
  ASSERT_DEATH({ device.Le(); }, MatchesRegex(".*"));
  ASSERT_DEATH({ device.Classic(); }, MatchesRegex(".*"));

  // classic
  {