[AArch64,ELF] Restrict MOVZ/MOVK to non-PIC large code model (#70178)
[llvm-project.git] / lldb / unittests / Utility / EventTest.cpp
blob5f8f2b5ec89da1c4e5b2ded39b4284c579324570
1 //===-- EventTest.cpp -----------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Utility/Event.h"
10 #include "lldb/Utility/StreamString.h"
11 #include "gtest/gtest.h"
13 using namespace lldb_private;
15 static std::string to_string(const EventDataBytes &E) {
16 StreamString S;
17 E.Dump(&S);
18 return std::string(S.GetString());
21 TEST(EventTest, DumpEventDataBytes) {
22 EXPECT_EQ(R"("foo")", to_string(EventDataBytes("foo")));
23 EXPECT_EQ("01 02 03", to_string(EventDataBytes("\x01\x02\x03")));