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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to