OSDN Git Service

Cast binder data type to uint64_t in high bits test
authorHsin-Yi Chen <hsinyichen@google.com>
Fri, 28 Jul 2017 03:28:52 +0000 (11:28 +0800)
committerHaitao Shan <hshan@google.com>
Tue, 8 Aug 2017 22:20:09 +0000 (15:20 -0700)
commit7e04edd5b3f0ca9a2d8bca78d5ae70c09b623299
tree1e33a29730604be3fa7716d695e694eacd480858
parent72cce2f70a7b13b41f442b65ae80506a69415266
Cast binder data type to uint64_t in high bits test

1. Cast fb->binder to uint64_t before shifting by 32 bits. It avoids
undefined result when binder is 32-bit.

2. Swap EXPECT_EQ arguments. The first one is expected value and the
second is actual value.

Bug: 64118463
Test: ./binderLibTest on x86 emulator
Change-Id: I4f736bd5b55db5af8598db0d5cd5fbd9ef323448
libs/binder/tests/binderLibTest.cpp