1 //===-- BreakpointIDTest.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 "gtest/gtest.h"
11 #include "lldb/Breakpoint/BreakpointID.h"
12 #include "lldb/Utility/Status.h"
14 #include "llvm/ADT/StringRef.h"
17 using namespace lldb_private
;
19 TEST(BreakpointIDTest
, StringIsBreakpointName
) {
21 EXPECT_FALSE(BreakpointID::StringIsBreakpointName("1breakpoint", E
));
22 EXPECT_FALSE(BreakpointID::StringIsBreakpointName("-", E
));
23 EXPECT_FALSE(BreakpointID::StringIsBreakpointName("", E
));
24 EXPECT_FALSE(BreakpointID::StringIsBreakpointName("3.4", E
));
26 EXPECT_TRUE(BreakpointID::StringIsBreakpointName("_", E
));
27 EXPECT_TRUE(BreakpointID::StringIsBreakpointName("a123", E
));
28 EXPECT_TRUE(BreakpointID::StringIsBreakpointName("test", E
));