diff options
author | Pavel Labath <labath@google.com> | 2016-02-25 17:41:59 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-02-25 17:41:59 +0000 |
commit | 5a8453d576319f5bca9dc3788e1ae29694e55911 (patch) | |
tree | e2d43761ff31d36e1cf9db6bb63690146cc840b5 /lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp | |
parent | 1d180c31f4b4e220c9575abac577dd4fad9483e5 (diff) | |
download | llvm-5a8453d576319f5bca9dc3788e1ae29694e55911.zip llvm-5a8453d576319f5bca9dc3788e1ae29694e55911.tar.gz llvm-5a8453d576319f5bca9dc3788e1ae29694e55911.tar.bz2 |
Fix PythonDataObjectsTests for python 2
Summary:
the python2 branch seems erroneous as it expected the object to be both a "String" and "Bytes".
Fix the expectation.
Reviewers: zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17545
llvm-svn: 261901
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp')
-rw-r--r-- | lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp index 3e375a3..c239a16 100644 --- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp +++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp @@ -209,14 +209,13 @@ TEST_F(PythonDataObjectsTest, TestPythonBytes) PyObject *py_bytes = PyBytes_FromString(test_bytes); EXPECT_TRUE(PythonBytes::Check(py_bytes)); PythonBytes python_bytes(PyRefType::Owned, py_bytes); - EXPECT_EQ(PyObjectType::Bytes, python_bytes.GetObjectType()); #if PY_MAJOR_VERSION < 3 EXPECT_TRUE(PythonString::Check(py_bytes)); EXPECT_EQ(PyObjectType::String, python_bytes.GetObjectType()); #else EXPECT_FALSE(PythonString::Check(py_bytes)); - EXPECT_NE(PyObjectType::String, python_bytes.GetObjectType()); + EXPECT_EQ(PyObjectType::Bytes, python_bytes.GetObjectType()); #endif llvm::ArrayRef<uint8_t> bytes = python_bytes.GetBytes(); |