summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2019-10-15 21:33:21 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-10-15 21:33:21 -0700
commite126b55e4cc342616db1f85f4420f55e0776ece2 (patch)
tree9cc53314889291ab1733e68b08a1ed16992c509a
parent5bc90355308e81eac46cd6df4f64faaf52bd37b4 (diff)
parent880ee3950a72faf15edcc28d29935196049cff93 (diff)
downloadplatform_hardware_interfaces-e126b55e4cc342616db1f85f4420f55e0776ece2.tar.gz
platform_hardware_interfaces-e126b55e4cc342616db1f85f4420f55e0776ece2.tar.bz2
platform_hardware_interfaces-e126b55e4cc342616db1f85f4420f55e0776ece2.zip
Merge "[hardware][interfaces][vehicle] fix -Wdangling-gsl in test"
am: 880ee3950a Change-Id: I49195beba67ac5b6bf50d720b7d12b02b8a6151a
-rw-r--r--automotive/vehicle/2.0/default/tests/VehicleObjectPool_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/automotive/vehicle/2.0/default/tests/VehicleObjectPool_test.cpp b/automotive/vehicle/2.0/default/tests/VehicleObjectPool_test.cpp
index a291351f0b..4e3ade15a3 100644
--- a/automotive/vehicle/2.0/default/tests/VehicleObjectPool_test.cpp
+++ b/automotive/vehicle/2.0/default/tests/VehicleObjectPool_test.cpp
@@ -57,11 +57,11 @@ public:
};
TEST_F(VehicleObjectPoolTest, valuePoolBasicCorrectness) {
- void* raw = valuePool->obtain(VehiclePropertyType::INT32).get();
+ auto value = valuePool->obtain(VehiclePropertyType::INT32);
// At this point, v1 should be recycled and the only object in the pool.
- ASSERT_EQ(raw, valuePool->obtain(VehiclePropertyType::INT32).get());
+ ASSERT_EQ(value.get(), valuePool->obtain(VehiclePropertyType::INT32).get());
// Obtaining value of another type - should return a new object
- ASSERT_NE(raw, valuePool->obtain(VehiclePropertyType::FLOAT).get());
+ ASSERT_NE(value.get(), valuePool->obtain(VehiclePropertyType::FLOAT).get());
ASSERT_EQ(3u, stats->Obtained);
ASSERT_EQ(2u, stats->Created);