1 //===-- BreakpointIDTest.cpp ------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "gtest/gtest.h"
12 #include "lldb/Breakpoint/BreakpointID.h"
13 #include "lldb/Core/Error.h"
15 #include "llvm/ADT/StringRef.h"
18 using namespace lldb_private;
20 TEST(BreakpointIDTest, StringIsBreakpointName) {
22 EXPECT_FALSE(BreakpointID::StringIsBreakpointName("1breakpoint", E));
23 EXPECT_FALSE(BreakpointID::StringIsBreakpointName("-", E));
24 EXPECT_FALSE(BreakpointID::StringIsBreakpointName("", E));
25 EXPECT_FALSE(BreakpointID::StringIsBreakpointName("3.4", E));
27 EXPECT_TRUE(BreakpointID::StringIsBreakpointName("_", E));
28 EXPECT_TRUE(BreakpointID::StringIsBreakpointName("a123", E));
29 EXPECT_TRUE(BreakpointID::StringIsBreakpointName("test", E));