OSDN Git Service

BLE Advertising Manager test improvements
authorJakub Pawlowski <jpawlowski@google.com>
Wed, 25 Jan 2017 11:06:49 +0000 (03:06 -0800)
committerJakub Pawlowski <jpawlowski@google.com>
Mon, 6 Feb 2017 21:51:49 +0000 (13:51 -0800)
commit3b2765696aca47bb7b5445b6061023816d429459
treeea4aa0de8be9d119de7316df95f79110fe2a6af2
parentf6d79c5d6c9cc829dcfa033d59bade4d83334df7
BLE Advertising Manager test improvements

This patch moves mock verification before call to callback. If for any
reason the callback is not properly initialized, this is usually due to
fact that the call didn't reach the mock. Right now in such cases we get
a crash and stack trace. After this patch we will first get information
about the mock not being called properly, then the crash, which would
make debugging such issues much easier.

Bug: 30622771
Test: manual test
Change-Id: Ia182f2eed384924395e8d6b6a2d3d0abd393a4ee
stack/test/ble_advertiser_test.cc