From a9c6df2ba9a9adeef5c14edb928d3fd943c0b6c7 Mon Sep 17 00:00:00 2001 From: Prachi Hande Date: Wed, 19 Jun 2019 18:57:52 -0700 Subject: [PATCH] Updated a method name in VmsUtils. Corrected "CreateDataMessageWithLayerPublisherInfo" to "createDataMessageWithLayerPublisherInfo" Bug: 135051289 Fixes: 135051289 Test: Updated tests in VmsUtilsTest. Ran the tests on Hawk. Change-Id: Ie5e130e125b90689d13a3f9bb8fa1f2f8a2bcbe0 --- .../vehicle/2.0/default/common/include/vhal_v2_0/VmsUtils.h | 2 +- automotive/vehicle/2.0/default/common/src/VmsUtils.cpp | 2 +- automotive/vehicle/2.0/default/tests/VmsUtils_test.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VmsUtils.h b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VmsUtils.h index 87010cea0c..f064367fdc 100644 --- a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VmsUtils.h +++ b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VmsUtils.h @@ -172,7 +172,7 @@ std::unique_ptr createSubscriptionsRequest(); // should first convert the proto to a byte string (vms_packet) using the // SerializeToString proto API. Then, it use this interface to build the VehicleProperty // by passing publisher and layer information (layer_publisher) and the vms_packet. -std::unique_ptr CreateDataMessageWithLayerPublisherInfo( +std::unique_ptr createDataMessageWithLayerPublisherInfo( const VmsLayerAndPublisher& layer_publisher, const std::string& vms_packet); // Creates a VehiclePropValue containing a message of type diff --git a/automotive/vehicle/2.0/default/common/src/VmsUtils.cpp b/automotive/vehicle/2.0/default/common/src/VmsUtils.cpp index f16489ce83..a5fcbaf612 100644 --- a/automotive/vehicle/2.0/default/common/src/VmsUtils.cpp +++ b/automotive/vehicle/2.0/default/common/src/VmsUtils.cpp @@ -126,7 +126,7 @@ std::unique_ptr createSubscriptionsRequest() { return result; } -std::unique_ptr CreateDataMessageWithLayerPublisherInfo( +std::unique_ptr createDataMessageWithLayerPublisherInfo( const VmsLayerAndPublisher& layer_publisher, const std::string& vms_packet) { auto result = createBaseVmsMessage(kMessageTypeSize + kLayerAndPublisherSize); result->value.int32Values = hidl_vec{ diff --git a/automotive/vehicle/2.0/default/tests/VmsUtils_test.cpp b/automotive/vehicle/2.0/default/tests/VmsUtils_test.cpp index 8a434c85b8..3716738f66 100644 --- a/automotive/vehicle/2.0/default/tests/VmsUtils_test.cpp +++ b/automotive/vehicle/2.0/default/tests/VmsUtils_test.cpp @@ -141,7 +141,7 @@ TEST(VmsUtilsTest, subscriptionsMessage) { TEST(VmsUtilsTest, dataMessage) { const std::string bytes = "aaa"; const VmsLayerAndPublisher layer_and_publisher(VmsLayer(2, 0, 1), 123); - auto message = CreateDataMessageWithLayerPublisherInfo(layer_and_publisher, bytes); + auto message = createDataMessageWithLayerPublisherInfo(layer_and_publisher, bytes); ASSERT_NE(message, nullptr); EXPECT_TRUE(isValidVmsMessage(*message)); EXPECT_EQ(message->prop, toInt(VehicleProperty::VEHICLE_MAP_SERVICE)); @@ -177,7 +177,7 @@ TEST(VmsUtilsTest, invalidMessageType) { TEST(VmsUtilsTest, parseDataMessage) { const std::string bytes = "aaa"; const VmsLayerAndPublisher layer_and_publisher(VmsLayer(1, 0, 1), 123); - auto message = CreateDataMessageWithLayerPublisherInfo(layer_and_publisher, bytes); + auto message = createDataMessageWithLayerPublisherInfo(layer_and_publisher, bytes); auto data_str = parseData(*message); ASSERT_FALSE(data_str.empty()); EXPECT_EQ(data_str, bytes);