[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData support any JSON type (PR #101929)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 7 01:46:55 PDT 2024
================
@@ -110,6 +110,23 @@ class MyRandomClass:
self.assertTrue(my_random_class)
self.assertEqual(my_random_class.payload, MyRandomClass.payload)
+ example_arr = [1, 2.3, "4", {"5": False}]
+ arr_str = json.dumps(example_arr)
+ s.Clear()
+ s.Print(arr_str)
+ example = lldb.SBStructuredData()
+
+ # Check SetFromJSON API for dictionaries, integers, floating point
+ # values, strings and arrays
+ error = example.SetFromJSON(s)
+ if not error.Success():
+ self.fail("FAILED: " + error.GetCString())
----------------
labath wrote:
Ah, maybe I see... You've changed one instance to assertSucess, but then added another one with the old pattern, right?
If so, then just change the other one as well, and this is good to go :)
https://github.com/llvm/llvm-project/pull/101929
More information about the lldb-commits
mailing list