//===-- FormattersContainerTests.cpp --------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "lldb/DataFormatters/FormattersContainer.h" #include "lldb/DataFormatters/FormatClasses.h" #include "gtest/gtest.h" usingnamespacelldb; usingnamespacelldb_private; // Creates a dummy candidate with just a type name in order to test the string // matching (exact name match and regex match) paths. FormattersMatchCandidate CandidateFromTypeName(const char *type_name) { … } // All the prefixes that the exact name matching will strip from the type. static const std::vector<std::string> exact_name_prefixes = …; // TypeMatcher that uses a exact type name string that needs to be matched. TEST(TypeMatcherTests, ExactName) { … } // TypeMatcher that uses a regex to match a type name. TEST(TypeMatcherTests, RegexName) { … } // TypeMatcher that only searches the type name. TEST(TypeMatcherTests, RegexMatchPart) { … } // GetMatchString for exact type name matchers. TEST(TypeMatcherTests, GetMatchStringExactName) { … } // GetMatchString for regex matchers. TEST(TypeMatcherTests, GetMatchStringRegex) { … } // GetMatchString for regex matchers. TEST(TypeMatcherTests, CreatedBySameMatchString) { … } // Test CreatedBySameMatchString with stripped exact name prefixes. TEST(TypeMatcherTests, CreatedBySameMatchStringExactNamePrefixes) { … }