summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-16 21:45:11 +0000
committerZachary Turner <zturner@google.com>2016-11-16 21:45:11 +0000
commit6fe867a8306a6f0a75f85ba9c68a89a67557e7b0 (patch)
tree00bbff83b042ae0216ee32e5c39785e68b70589e /lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
parent067d1db139b6f9d32f8cce8f5af8319613d523c1 (diff)
downloadbcm5719-llvm-6fe867a8306a6f0a75f85ba9c68a89a67557e7b0.tar.gz
bcm5719-llvm-6fe867a8306a6f0a75f85ba9c68a89a67557e7b0.zip
Fix some unit test compilation failures.
llvm-svn: 287158
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index 202a65b7f25..192e64d0703 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -255,17 +255,17 @@ TEST_F(PythonDataObjectsTest, TestPythonString) {
// Test that creating a `PythonString` object works correctly with the
// string constructor
PythonString constructed_string(test_string2);
- EXPECT_STREQ(test_string2, constructed_string.c_str());
+ EXPECT_EQ(test_string2, constructed_string.GetString());
}
TEST_F(PythonDataObjectsTest, TestPythonStringToStr) {
- const char *c_str = "PythonDataObjectsTest::TestPythonStringToStr";
+ const char *GetString = "PythonDataObjectsTest::TestPythonStringToStr";
- PythonString str(c_str);
- EXPECT_STREQ(c_str, str.c_str());
+ PythonString str(GetString);
+ EXPECT_EQ(GetString, str.GetString());
PythonString str_str = str.Str();
- EXPECT_STREQ(c_str, str_str.c_str());
+ EXPECT_EQ(GetString, str_str.GetString());
}
TEST_F(PythonDataObjectsTest, TestPythonIntegerToStr) {}
@@ -281,7 +281,7 @@ TEST_F(PythonDataObjectsTest, TestPythonStringToStructuredString) {
"PythonDataObjectsTest::TestPythonStringToStructuredString";
PythonString constructed_string(test_string);
auto string_sp = constructed_string.CreateStructuredString();
- EXPECT_STREQ(test_string, string_sp->GetStringValue().c_str());
+ EXPECT_EQ(test_string, string_sp->GetStringValue());
}
TEST_F(PythonDataObjectsTest, TestPythonListValueEquality) {
@@ -315,7 +315,7 @@ TEST_F(PythonDataObjectsTest, TestPythonListValueEquality) {
PythonString chk_str(PyRefType::Borrowed, chk_value2.get());
EXPECT_EQ(long_value0, chk_int.GetInteger());
- EXPECT_STREQ(string_value1, chk_str.c_str());
+ EXPECT_EQ(string_value1, chk_str.GetString());
}
TEST_F(PythonDataObjectsTest, TestPythonListManipulation) {
@@ -343,7 +343,7 @@ TEST_F(PythonDataObjectsTest, TestPythonListManipulation) {
PythonString chk_str(PyRefType::Borrowed, chk_value2.get());
EXPECT_EQ(long_value0, chk_int.GetInteger());
- EXPECT_STREQ(string_value1, chk_str.c_str());
+ EXPECT_EQ(string_value1, chk_str.GetString());
}
TEST_F(PythonDataObjectsTest, TestPythonListToStructuredList) {
@@ -364,7 +364,7 @@ TEST_F(PythonDataObjectsTest, TestPythonListToStructuredList) {
auto string_sp = array_sp->GetItemAtIndex(1)->GetAsString();
EXPECT_EQ(long_value0, long(int_sp->GetValue()));
- EXPECT_STREQ(string_value1, string_sp->GetValue().c_str());
+ EXPECT_EQ(string_value1, string_sp->GetValue());
}
TEST_F(PythonDataObjectsTest, TestPythonTupleSize) {
@@ -466,7 +466,7 @@ TEST_F(PythonDataObjectsTest, TestPythonDictionaryValueEquality) {
PythonString chk_str(PyRefType::Borrowed, chk_value2.get());
EXPECT_EQ(value_0, chk_int.GetInteger());
- EXPECT_STREQ(value_1, chk_str.c_str());
+ EXPECT_EQ(value_1, chk_str.GetString());
}
TEST_F(PythonDataObjectsTest, TestPythonDictionaryManipulation) {
@@ -503,7 +503,7 @@ TEST_F(PythonDataObjectsTest, TestPythonDictionaryManipulation) {
PythonString chk_str(PyRefType::Borrowed, chk_value2.get());
EXPECT_EQ(value_0, chk_int.GetInteger());
- EXPECT_STREQ(value_1, chk_str.c_str());
+ EXPECT_EQ(value_1, chk_str.GetString());
}
TEST_F(PythonDataObjectsTest, TestPythonDictionaryToStructuredDictionary) {
@@ -526,7 +526,7 @@ TEST_F(PythonDataObjectsTest, TestPythonDictionaryToStructuredDictionary) {
auto string_sp = dict_sp->GetValueForKey(string_key0)->GetAsString();
auto int_sp = dict_sp->GetValueForKey(string_key1)->GetAsInteger();
- EXPECT_STREQ(string_value0, string_sp->GetValue().c_str());
+ EXPECT_EQ(string_value0, string_sp->GetValue());
EXPECT_EQ(int_value1, long(int_sp->GetValue()));
}
OpenPOWER on IntegriCloud