[Lldb-commits] [PATCH] D68657: Update MinidumpYAML to use minidump::Exception for exception stream

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 14 07:10:43 PDT 2019


labath added inline comments.


================
Comment at: llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp:310-316
+  ASSERT_FALSE(ExpectedFile);
+  auto Unhandled =
+      handleErrors(ExpectedFile.takeError(), [](const StringError &error) {
+        EXPECT_EQ(static_cast<int>(std::errc::invalid_argument),
+                  error.convertToErrorCode().value());
+      });
+  EXPECT_THAT_ERROR(std::move(Unhandled), Succeeded());
----------------
JosephTremoulet wrote:
> labath wrote:
> > Maybe:
> > ```
> > EXPECT_THAT_EXPECTED(ExpectedFile, Failed<StringError>(
> >     testing::Property(&StringError::convertToErrorCode,
> >          make_error_code(errc::invalid_argument))));
> > ```
> > ?
> > 
> > Though, this might actually be best off as a lit test where you just FileCheck the exact error message.
> Moved to lit, thanks for the suggestion.  The obvious place seemed to be llvm/test/ObjectYAML, but there weren't any minidump tests there so I added a minidump subdirectory for the new test.  Please let me know if there was a better place that I just overlooked.
there are some in `test/tools/yaml2obj`. I'd put it next to those.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68657/new/

https://reviews.llvm.org/D68657





More information about the lldb-commits mailing list