#include "gtest/gtest.h"
#include "lldb/Core/Highlighter.h"
#include "lldb/Host/FileSystem.h"
#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
#include "Plugins/Language/ObjC/ObjCLanguage.h"
#include "Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h"
#include "TestingSupport/SubsystemRAII.h"
#include <optional>
usingnamespacelldb_private;
namespace {
class HighlighterTest : public testing::Test { … };
}
static std::string getName(lldb::LanguageType type) { … }
static std::string getName(llvm::StringRef path) { … }
TEST_F(HighlighterTest, HighlighterSelectionType) { … }
TEST_F(HighlighterTest, HighlighterSelectionPath) { … }
TEST_F(HighlighterTest, FallbackHighlighter) { … }
static std::string
highlightDefault(llvm::StringRef code, HighlightStyle style,
std::optional<size_t> cursor = std::optional<size_t>()) { … }
TEST_F(HighlighterTest, DefaultHighlighter) { … }
TEST_F(HighlighterTest, DefaultHighlighterWithCursor) { … }
TEST_F(HighlighterTest, DefaultHighlighterWithCursorOutOfBounds) { … }
static std::string
highlightC(llvm::StringRef code, HighlightStyle style,
std::optional<size_t> cursor = std::optional<size_t>()) { … }
TEST_F(HighlighterTest, ClangEmptyInput) { … }
TEST_F(HighlighterTest, ClangScalarLiterals) { … }
TEST_F(HighlighterTest, ClangStringLiterals) { … }
TEST_F(HighlighterTest, ClangUnterminatedString) { … }
TEST_F(HighlighterTest, Keywords) { … }
TEST_F(HighlighterTest, Colons) { … }
TEST_F(HighlighterTest, ClangBraces) { … }
TEST_F(HighlighterTest, ClangSquareBrackets) { … }
TEST_F(HighlighterTest, ClangCommas) { … }
TEST_F(HighlighterTest, ClangPPDirectives) { … }
TEST_F(HighlighterTest, ClangPreserveNewLine) { … }
TEST_F(HighlighterTest, ClangTrailingBackslashBeforeNewline) { … }
TEST_F(HighlighterTest, ClangTrailingBackslashWithWhitespace) { … }
TEST_F(HighlighterTest, ClangTrailingBackslashMissingNewLine) { … }
TEST_F(HighlighterTest, ClangComments) { … }
TEST_F(HighlighterTest, ClangOperators) { … }
TEST_F(HighlighterTest, ClangIdentifiers) { … }
TEST_F(HighlighterTest, ClangCursorPos) { … }
TEST_F(HighlighterTest, ClangCursorPosEndOfLine) { … }
TEST_F(HighlighterTest, ClangCursorOutOfBounds) { … }
TEST_F(HighlighterTest, ClangCursorPosBeforeOtherToken) { … }
TEST_F(HighlighterTest, ClangCursorPosAfterOtherToken) { … }
TEST_F(HighlighterTest, ClangCursorPosInOtherToken) { … }