[Lldb-commits] [PATCH] D68179: [lldb] Fix JSON parser to allow empty arrays
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 14 00:05:43 PST 2019
labath added a comment.
Looks good to me. If I was writing the test, I'd probably just make it do a string->json->string round-trip and then verify the final string. But this is fine too...
================
Comment at: lldb/unittests/debugserver/JSONTest.cpp:16-17
+void TestJSON(JSONValue *json_val, const std::function<void(T &)> &test_func) {
+ EXPECT_THAT(json_val, testing::NotNull());
+ EXPECT_TRUE(T::classof(json_val));
+ test_func(static_cast<T &>(*json_val));
----------------
You may want to change these into ASSERT_xxx to avoid crashing later if the expectations are not met.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68179/new/
https://reviews.llvm.org/D68179
More information about the lldb-commits
mailing list