std::string from const hidl_string test
Bug: 36532780
Test: libhidl_test passes
Change-Id: I22cb52fa9d441e92f6c4dfdcc8d0d0657bf0c0f5
diff --git a/test_main.cpp b/test_main.cpp
index 7859156..658a7eb 100644
--- a/test_main.cpp
+++ b/test_main.cpp
@@ -94,6 +94,12 @@
EXPECT_EQ(myString, "great");
EXPECT_STREQ(anotherCString, "great");
+ const hidl_string t = "not so great";
+ std::string myTString = t;
+ const char * anotherTCString = t;
+ EXPECT_EQ(myTString, "not so great");
+ EXPECT_STREQ(anotherTCString, "not so great");
+
// Comparisons
const char * cstr1 = "abc";
std::string string1(cstr1);