commit | b326a37f4977533479674af0e205ee0404c4110d | [log] [tgz] |
---|---|---|
author | Lakshman Annadorai <lakshmana@google.com> | Tue Nov 26 11:16:09 2019 -0800 |
committer | Lakshman Annadorai <lakshmana@google.com> | Thu Dec 05 13:47:04 2019 -0800 |
tree | 104af191a2850878eb62fa50e22b0a91df28ab5e | |
parent | 89644c552c201f2587fff8726a621a8a3fd0ab50 [diff] |
Add a test to execute CarPropertyService.registerListener for all the registered properties. - Spy on CarPropertyService and capture property IDs passed to registerListener call so the test can verify whether these IDs match the expected IDs. If not, the test throws errors. - The default values for the expected properties will trigger listener.onEvent() in CarPropertyService.registerListener thus not properly initialized listeners will crash (eg: b/137761936#comment2) during presubmit. Bug: 139063341 Test: Reverted ag/9110456 and confirmed the test is reproducing the crash. And also verified that the test complains when the regsitered properties are not assigned default values. Change-Id: I5f09a46602b997463998f1b2966b8c20b34895a5
Native (C++) code format is required to be compatible with .clang-format file. Run
git clang-format --style=file --extension='h,cpp,cc' HEAD~
Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.