mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 19:49:36 +00:00
[lldb] - Update unit tests after lib/ObjectYAML change.
An update after r371865 llvm-svn: 371866
This commit is contained in:
parent
8501102727
commit
69ba3defaf
@ -56,8 +56,9 @@ public:
|
||||
std::string data;
|
||||
llvm::raw_string_ostream os(data);
|
||||
llvm::yaml::Input YIn(yaml);
|
||||
if (llvm::Error E = llvm::yaml::convertYAML(YIn, os))
|
||||
return E;
|
||||
if (!llvm::yaml::convertYAML(YIn, os, [](const llvm::Twine &Msg) {}))
|
||||
return llvm::createStringError(llvm::inconvertibleErrorCode(),
|
||||
"convertYAML() failed");
|
||||
|
||||
os.flush();
|
||||
auto data_buffer_sp =
|
||||
@ -83,7 +84,8 @@ Streams:
|
||||
- Type: LinuxAuxv
|
||||
Content: DEADBEEFBAADF00D
|
||||
)");
|
||||
ASSERT_THAT_ERROR(llvm::yaml::convertYAML(YIn, os), llvm::Succeeded());
|
||||
|
||||
ASSERT_TRUE(llvm::yaml::convertYAML(YIn, os, [](const llvm::Twine &Msg){}));
|
||||
os.flush();
|
||||
auto data_buffer_sp = std::make_shared<DataBufferHeap>(
|
||||
duplicate_streams.data(), duplicate_streams.size());
|
||||
|
@ -39,8 +39,9 @@ llvm::Expected<TestFile> TestFile::fromYaml(llvm::StringRef Yaml) {
|
||||
{
|
||||
llvm::raw_fd_ostream OS(FD, /*shouldClose*/ true);
|
||||
llvm::yaml::Input YIn(Yaml);
|
||||
if (llvm::Error E = llvm::yaml::convertYAML(YIn, OS))
|
||||
return std::move(E);
|
||||
if (!llvm::yaml::convertYAML(YIn, OS, [](const llvm::Twine &Msg) {}))
|
||||
return llvm::createStringError(llvm::inconvertibleErrorCode(),
|
||||
"convertYAML() failed");
|
||||
}
|
||||
return TestFile(Name, std::move(Remover));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user