util/cexec: Fix bug in std::string helper
Change-Id: Ic561f96986763a1c4626deb8a1c39ba1fa1573b2
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/util/cexec.cpp b/test/util/cexec.cpp
index 51fdb8b..c41c2d4 100644
--- a/test/util/cexec.cpp
+++ b/test/util/cexec.cpp
@@ -69,7 +69,7 @@
TEST(Cexec, CallCheckErrnoInt)
{
EXPECT_EQ(1, callCheckErrno("sample1", sample1));
- EXPECT_EQ(2, callCheckErrno("sample2", &sample2, 2));
+ EXPECT_EQ(2, callCheckErrno(std::string("sample2"), &sample2, 2));
EXPECT_EQ(4, callCheckErrno("sample::s", sample::s, 4));
ssize_t v = 10;
EXPECT_EQ(12, callCheckErrno("sample3", sample3, 2, &v));
@@ -169,7 +169,7 @@
TEST(Cexec, CallCheckRetInt)
{
EXPECT_EQ(1, callCheckRet("sample1", sample1));
- EXPECT_EQ(2, callCheckRet("sample2", &sample2, 2));
+ EXPECT_EQ(2, callCheckRet(std::string("sample2"), &sample2, 2));
EXPECT_EQ(4, callCheckRet("sample::s", sample::s, 4));
ssize_t v = 10;
EXPECT_EQ(12, callCheckRet("sample3", sample3, 2, &v));