================
@@ -130,6 +130,38 @@ class MyRandomClass:
         self.assertSuccess(example.SetFromJSON("null"))
         self.assertEqual(example.GetType(), lldb.eStructuredDataTypeNull)
 
+        example = lldb.SBStructuredData()
+        example.SetUnsignedIntegerValue(1)
+        self.assertEqual(example.GetType(), lldb.eStructuredDataTypeInteger)
+        self.assertEqual(example.GetIntegerValue(), 1)
+
+        example.SetSignedIntegerValue(-42)
+        self.assertEqual(example.GetType(), 
lldb.eStructuredDataTypeSignedInteger)
+        self.assertEqual(example.GetSignedIntegerValue(), -42)
+
+        example.SetFloatValue(4.19)
+        self.assertEqual(example.GetType(), lldb.eStructuredDataTypeFloat)
+        self.assertEqual(example.GetFloatValue(), 4.19)
+
+        example.SetStringValue("Bonjour, 123!")
+        self.assertEqual(example.GetType(), lldb.eStructuredDataTypeString)
+        self.assertEqual(example.GetStringValue(42), "Bonjour, 123!")
+
----------------
bulbazord wrote:

Can you add a test for dictionary, both adding to an existing one and 
clobbering a structured data of different type?

https://github.com/llvm/llvm-project/pull/154445
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to