Verify that strings are properly marshaled from Java to native
in particular verify that strings retain their original size.
Bug: 35038064
Test: hidl_test_java
Change-Id: Id0308ad14fcb0f419ffbc74873efe3a24cfd6662
diff --git a/test/java_test/hidl_test_java_native.cpp b/test/java_test/hidl_test_java_native.cpp
index 56644f9..2bf5417 100644
--- a/test/java_test/hidl_test_java_native.cpp
+++ b/test/java_test/hidl_test_java_native.cpp
@@ -678,6 +678,10 @@
baz->someOtherBaseMethod(
foo,
[&](const auto &result) {
+ // Strings should have the same size as they did before
+ // marshaling. b/35038064
+ EXPECT_EQ(result.y.s.size(), foo.y.s.size());
+
EXPECT_EQ(
to_string(result),
"Foo(x = 1, "