summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorAbhishek Aggarwal <abhishek.a.aggarwal@intel.com>2017-05-29 08:25:46 +0000
committerAbhishek Aggarwal <abhishek.a.aggarwal@intel.com>2017-05-29 08:25:46 +0000
commit5bfee5f1c8b11915b6c2c894b8f938f406c14e93 (patch)
tree631f4c95bcd505406d6483262b04193b32511626 /lldb/unittests/ScriptInterpreter/Python
parentbf4aed2c38477758a7c5243f95675d55fe6d1633 (diff)
downloadbcm5719-llvm-5bfee5f1c8b11915b6c2c894b8f938f406c14e93.tar.gz
bcm5719-llvm-5bfee5f1c8b11915b6c2c894b8f938f406c14e93.zip
Added new API to SBStructuredData class
Summary: - Added API to access data types -- integer, double, array, string, boolean and dictionary data types -- Earlier user had to parse through the string output to get these values - Added Test cases for API testing - Added new StructuredDataType enum in public include file -- Replaced locally-defined enum in StructuredData.h with this new one -- Modified other internal files using this locally-defined enum Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: clayborg, lldb-commits Reviewed By: clayborg Subscribers: labath Differential Revision: https://reviews.llvm.org/D33434 llvm-svn: 304138
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index 192e64d0703..1376f268aa7 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -15,6 +15,7 @@
#include "lldb/Host/File.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
+#include "lldb/lldb-enumerations.h"
#include "PythonTestSuite.h"
@@ -355,9 +356,9 @@ TEST_F(PythonDataObjectsTest, TestPythonListToStructuredList) {
list.AppendItem(PythonString(string_value1));
auto array_sp = list.CreateStructuredArray();
- EXPECT_EQ(StructuredData::Type::eTypeInteger,
+ EXPECT_EQ(lldb::eStructuredDataTypeInteger,
array_sp->GetItemAtIndex(0)->GetType());
- EXPECT_EQ(StructuredData::Type::eTypeString,
+ EXPECT_EQ(lldb::eStructuredDataTypeString,
array_sp->GetItemAtIndex(1)->GetType());
auto int_sp = array_sp->GetItemAtIndex(0)->GetAsInteger();
@@ -424,9 +425,9 @@ TEST_F(PythonDataObjectsTest, TestPythonTupleToStructuredList) {
auto array_sp = tuple.CreateStructuredArray();
EXPECT_EQ(tuple.GetSize(), array_sp->GetSize());
- EXPECT_EQ(StructuredData::Type::eTypeInteger,
+ EXPECT_EQ(lldb::eStructuredDataTypeInteger,
array_sp->GetItemAtIndex(0)->GetType());
- EXPECT_EQ(StructuredData::Type::eTypeString,
+ EXPECT_EQ(lldb::eStructuredDataTypeString,
array_sp->GetItemAtIndex(1)->GetType());
}
OpenPOWER on IntegriCloud