1 //===-- EventTest.cpp -----------------------------------------------------===//
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
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
) {
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")));