Home
last modified time | relevance | path

Searched refs:testing (Results 1 – 25 of 1597) sorted by relevance

12345678910>>...64

/llvm-project/clang-tools-extra/test/clang-tidy/checkers/google/
H A Dupgrade-googletest-case.cpp64 class FooTest : public testing::Test {
82 template <typename T> class FooTypedTest : public testing::Test {
100 class BarTest : public testing::Test {
122 class BarTest3 : public testing::Test {
134 namespace testing { namespace
145 testing::Test::SetUpTestCase(); in Test()
146 testing::Test::TearDownTestCase(); in Test()
160 #define TEST_SET_UP_TEST_CASE_MACRO_WARN_ONLY ::testing::Test::SetUpTestCase
163 testing::Test::SetUpTestCase(); in setUpTearDownCallAndReference()
170 testing::Test::TearDownTestCase(); in setUpTearDownCallAndReference()
[all …]
/llvm-project/third-party/unittest/googletest/include/gtest/
H A Dgtest-spi.h43 namespace testing {
155 ::testing::TestPartResultArray gtest_failures; \
156 ::testing::internal::SingleFailureChecker gtest_checker( \
157 &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr)); \
159 ::testing::ScopedFakeTestPartResultReporter gtest_reporter( \
160 ::testing::ScopedFakeTestPartResultReporter:: \
165 } while (::testing::internal::AlwaysFalse())
173 ::testing::TestPartResultArray gtest_failures; \
174 ::testing::internal::SingleFailureChecker gtest_checker( \
175 &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr)); \
[all …]
H A Dgtest-typed-test.h48 class FooTest : public testing::Test {
59 typedef testing::Types<char, int, unsigned int> MyTypes;
126 class FooTest : public testing::Test {
160 typedef testing::Types<char, int, unsigned int> MyTypes;
192 typedef ::testing::internal::GenerateTypeList<Types>::type \
194 typedef ::testing::internal::NameGeneratorSelector<__VA_ARGS__>::type \
209 GTEST_ATTRIBUTE_UNUSED_ = ::testing::internal::TypeParameterizedTest< \
211 ::testing::internal::TemplateSel<GTEST_TEST_CLASS_NAME_(CaseName, \
215 ::testing::internal::CodeLocation( \
219 ::testing::internal::GenerateNames< \
[all …]
H A Dgtest-param-test.h55 class FooTest : public ::testing::TestWithParam<const char*> {
157 class BaseTest : public ::testing::Test {
162 class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
184 namespace testing {
453 private ::testing::internal::GTestNonCopyable { \
460 ::testing::UnitTest::GetInstance() \
464 ::testing::internal::CodeLocation(__FILE__, __LINE__)) \
467 new ::testing::internal::TestMetaFactory<GTEST_TEST_CLASS_NAME_( \
469 ::testing::internal::CodeLocation(__FILE__, __LINE__)); \
497 static ::testing::internal::ParamGenerator<test_suite_name::ParamType> \
[all …]
H A Dgtest_pred_impl.h43 namespace testing {
79 if (const ::testing::AssertionResult gtest_ar = (expression)) \
94 << e1 << " evaluates to " << ::testing::PrintToString(v1); in AssertPred1Helper()
105 GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, #v1, pred, v1), on_failure)
127 << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n" in AssertPred2Helper()
128 << e2 << " evaluates to " << ::testing::PrintToString(v2); in AssertPred2Helper()
139 GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, #v1, #v2, pred, v1, v2), \
164 << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n" in AssertPred3Helper()
165 << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n" in AssertPred3Helper()
166 << e3 << " evaluates to " << ::testing::PrintToString(v3); in AssertPred3Helper()
[all …]
/llvm-project/llvm/unittests/DebugInfo/Symbolizer/
H A DMarkupTest.cpp22 using namespace testing;
39 EXPECT_THAT(Parser.nextNode(), testing::Optional(isNode("text"))); in TEST()
44 EXPECT_THAT(Parser.nextNode(), testing::Optional(isNode("kept"))); in TEST()
48 EXPECT_THAT(Parser.nextNode(), testing::Optional(isNode("text\n"))); in TEST()
52 EXPECT_THAT(Parser.nextNode(), testing::Optional(isNode("text\r\n"))); in TEST()
56 EXPECT_THAT(Parser.nextNode(), testing::Optional(isNode("{{{"))); in TEST()
60 EXPECT_THAT(Parser.nextNode(), testing::Optional(isNode("{{{}}"))); in TEST()
64 EXPECT_THAT(Parser.nextNode(), testing::Optional(isNode("{{}}}"))); in TEST()
68 EXPECT_THAT(Parser.nextNode(), testing::Optional(isNode("{{{}}}"))); in TEST()
72 EXPECT_THAT(Parser.nextNode(), testing::Optional(isNode("{{{:field}}}"))); in TEST()
[all …]
/llvm-project/third-party/benchmark/test/
H A Dbenchmark_gtest.cc18 EXPECT_THAT(dst, testing::ElementsAre(1, 2)); in TEST()
24 EXPECT_THAT(dst, testing::ElementsAre(1, 2)); in TEST()
30 EXPECT_THAT(dst, testing::ElementsAre(5, 8, 15)); in TEST()
36 EXPECT_THAT(dst, testing::ElementsAre(5, 8, 15)); in TEST()
43 dst, testing::ElementsAre(int8_t{1}, int8_t{8}, int8_t{64}, int8_t{127})); in TEST()
50 dst, testing::ElementsAre(1LL, 1024LL, 1048576LL, 1073741824LL, in TEST()
58 EXPECT_THAT(dst, testing::ElementsAre(-8, -4, -2, -1, 0)); in TEST()
64 EXPECT_THAT(dst, testing::ElementsAre(-8, -4, -2, -1)); in TEST()
70 EXPECT_THAT(dst, testing::ElementsAre(-8, -4, -2, -1, 0, 1, 2, 4, 8)); in TEST()
76 EXPECT_THAT(dst, testing::ElementsAre(-30, -25, -5, -1, 0, 1, 5, 25, 32)); in TEST()
[all …]
/llvm-project/clang/unittests/ASTMatchers/
H A DASTMatchersTest.h90 testing::AssertionResult matchesConditionally(
101 return testing::AssertionFailure() << "Could not add dynamic matcher";
130 return testing::AssertionFailure() << "Parsing error in \"" << Code << "\"";
133 return testing::AssertionFailure()
138 return testing::AssertionFailure()
141 return testing::AssertionFailure()
144 return testing::AssertionSuccess();
148 testing::AssertionResult
159 return testing::AssertionSuccess(); in matchesConditionally()
163 testing
[all...]
/llvm-project/lldb/unittests/Expression/
H A DCppModuleConfigurationTest.cpp21 struct CppModuleConfigurationTest : public testing::Test {
71 EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std")); in TEST_F()
73 testing::ElementsAre(libcpp, ResourceInc(), usr)); in TEST_F()
90 EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std")); in TEST_F()
92 testing::ElementsAre(libcpp, ResourceInc(), usr, usr_target, in TEST_F()
107 EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std")); in TEST_F()
109 testing::ElementsAre(libcpp, ResourceInc(), usr)); in TEST_F()
123 EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std")); in TEST_F()
125 testing::ElementsAre(libcpp, ResourceInc(), usr)); in TEST_F()
141 EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std")); in TEST_F()
[all …]
/llvm-project/clang/unittests/AST/
H A DCommentParser.cpp33 class CommentParserTest : public ::testing::Test {
78 ::testing::AssertionResult HasChildCount(const Comment *C, size_t Count) { in HasChildCount()
80 return ::testing::AssertionFailure() << "Comment is NULL"; in HasChildCount()
83 return ::testing::AssertionFailure() in HasChildCount()
87 return ::testing::AssertionSuccess(); in HasChildCount()
91 ::testing::AssertionResult GetChildAt(const Comment *C, in GetChildAt()
95 return ::testing::AssertionFailure() << "Comment is NULL"; in GetChildAt()
98 return ::testing::AssertionFailure() in GetChildAt()
105 return ::testing::AssertionFailure() << "Child is NULL"; in GetChildAt()
109 return ::testing::AssertionFailure() in GetChildAt()
[all …]
H A DASTImporterVisibilityTest.cpp99 using ImportVisibilityChainParams = ::testing::WithParamInterface<
181 ::testing::Combine(DefaultTestValuesForRunOptions,
182 ::testing::Values(ExternF, StaticF,
186 ::testing::Combine(
195 ::testing::Values(ExternV, AnonV)) );
198 ::testing::Combine(
200 ::testing::Values(ExternC, AnonC)) );
203 ::testing::Combine(
205 ::testing::Values(ExternEC, AnonEC)) );
208 ::testing::Combine(DefaultTestValuesForRunOptions,
[all …]
/llvm-project/third-party/unittest/googletest/include/gtest/internal/
H A Dgtest-death-test-internal.h52 namespace testing {
177 ::testing::internal::RE regex) { in MakeDeathTestMatcher()
206 ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \
209 death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
211 death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
224 if (::testing::internal::AlwaysTrue()) { \
225 ::testing::internal::DeathTest* gtest_dt; \
226 if (!::testing::internal::DeathTest::Create( \
228 ::testing::internal::MakeDeathTestMatcher(regex_or_matcher), \
233 std::unique_ptr< ::testing::internal::DeathTest> gtest_dt_ptr(gtest_dt); \
[all …]
/llvm-project/lldb/unittests/Utility/
H A DRangeMapTest.cpp25 testing::ElementsAre(Entry(-10, 3), Entry(-3, 6), Entry(10, 5))); in TEST()
52 EXPECT_THAT(V, testing::ElementsAre(Entry(0, 1), Entry(5, 2), Entry(10, 9), in TEST()
61 EXPECT_THAT(V, testing::ElementsAre(Entry(0, 20))); in TEST()
122 static testing::Matcher<const EntryT *> EntryIs(uint32_t ID) { in TEST()
123 return testing::Pointee(testing::Field(&EntryT::data, ID)); in TEST()
215 EXPECT_THAT(FindEntryIndexes(0, Map), testing::ElementsAre(10)); in TEST()
216 EXPECT_THAT(FindEntryIndexes(9, Map), testing::ElementsAre(10)); in TEST()
217 EXPECT_THAT(FindEntryIndexes(10, Map), testing::ElementsAre(11)); in TEST()
218 EXPECT_THAT(FindEntryIndexes(19, Map), testing in TEST()
[all...]
H A DStringExtractorGDBRemoteTest.cpp113 ::testing::Pair(100, StringExtractorGDBRemote::AllThreads)); in TEST()
116 EXPECT_THAT(*ex.GetPidTid(100), ::testing::Pair(100, 0x1234ULL)); in TEST()
119 EXPECT_THAT(*ex.GetPidTid(100), ::testing::Pair(100, 0x123456789ABCDEF0ULL)); in TEST()
125 ::testing::Pair(StringExtractorGDBRemote::AllProcesses, in TEST()
130 ::testing::Pair(0x1234ULL, StringExtractorGDBRemote::AllThreads)); in TEST()
134 ::testing::Pair(0x123456789ABCDEF0ULL, in TEST()
139 ::testing::Pair(StringExtractorGDBRemote::AllProcesses, in TEST()
146 ::testing::Pair(StringExtractorGDBRemote::AllProcesses, in TEST()
151 ::testing::Pair(0x1234ULL, StringExtractorGDBRemote::AllThreads)); in TEST()
155 ::testing::Pair(0x1234ULL, 0x123456789ABCDEF0ULL)); in TEST()
[all …]
H A DSharedClusterTest.cpp35 ASSERT_THAT(Queue, testing::IsEmpty()); in TEST()
39 ASSERT_THAT(Queue, testing::IsEmpty()); in TEST()
44 ASSERT_THAT(Queue, testing::IsEmpty()); in TEST()
50 ASSERT_THAT(Queue, testing::IsEmpty()); in TEST()
53 ASSERT_THAT(Queue, testing::IsEmpty()); in TEST()
55 ASSERT_THAT(Queue, testing::IsEmpty()); in TEST()
57 ASSERT_THAT(Queue, testing::ElementsAre(1, 2)); in TEST()
/llvm-project/llvm/include/llvm/Testing/Support/
H A DError.h32 : public testing::MatcherInterface<const ExpectedHolder<T> &> {
34 explicit ValueMatchesMono(const testing::Matcher<T> &Matcher) in ValueMatchesMono()
38 testing::MatchResultListener *listener) const override { in MatchAndExplain()
65 testing::Matcher<T> Matcher;
74 operator testing::Matcher<const ExpectedHolder<T> &>() const {
76 new ValueMatchesMono<T>(testing::SafeMatcherCast<T>(Matcher)));
84 class ErrorMatchesMono : public testing::MatcherInterface<const ErrorHolder &> {
86 explicit ErrorMatchesMono(std::optional<testing::Matcher<InfoT &>> Matcher) in ErrorMatchesMono()
90 testing::MatchResultListener *listener) const override { in MatchAndExplain()
128 std::optional<testing::Matcher<InfoT &>> Matcher;
[all …]
/llvm-project/flang/unittests/Runtime/
H A DStop.cpp23 EXPECT_EXIT(RTNAME(StopStatement)(), testing::ExitedWithCode(EXIT_SUCCESS), in TEST()
32 RTNAME(StopStatement)(), testing::ExitedWithCode(EXIT_SUCCESS), ""); in TEST()
39 testing::ExitedWithCode(EXIT_SUCCESS), "Fortran STOP: bye bye"); in TEST()
43 testing::ExitedWithCode(EXIT_SUCCESS), ""); in TEST()
47 testing::ExitedWithCode(EXIT_FAILURE), "Fortran ERROR STOP: bye bye"); in TEST()
51 testing::ExitedWithCode(EXIT_FAILURE), ""); in TEST()
61 testing::ExitedWithCode(EXIT_SUCCESS), "bye bye"); in TEST()
65 testing::ExitedWithCode(EXIT_SUCCESS), ""); in TEST()
69 testing::ExitedWithCode(EXIT_FAILURE), "Fortran ERROR STOP: bye bye"); in TEST()
73 testing::ExitedWithCode(EXIT_FAILURE), ""); in TEST()
[all …]
/llvm-project/llvm/unittests/ADT/
H A DCombinationGeneratorTest.cpp41 ASSERT_THAT(Variants, ::testing::SizeIs(NumVariants)); in TEST()
42 ASSERT_THAT(Variants, ::testing::ContainerEq(ExpectedVariants)); in TEST()
60 ASSERT_THAT(Variants, ::testing::SizeIs(NumVariants)); in TEST()
61 ASSERT_THAT(Variants, ::testing::ContainerEq(ExpectedVariants)); in TEST()
81 ASSERT_THAT(Variants, ::testing::SizeIs(NumVariants)); in TEST()
82 ASSERT_THAT(Variants, ::testing::ContainerEq(ExpectedVariants)); in TEST()
100 ASSERT_THAT(Variants, ::testing::SizeIs(NumVariants)); in TEST()
101 ASSERT_THAT(Variants, ::testing::ContainerEq(ExpectedVariants)); in TEST()
119 ASSERT_THAT(Variants, ::testing::SizeIs(NumVariants)); in TEST()
120 ASSERT_THAT(Variants, ::testing::ContainerEq(ExpectedVariants)); in TEST()
[all …]
/llvm-project/lldb/unittests/Target/
H A DMemoryTagMapTest.cpp45 EXPECT_THAT(tag_map.GetTags(0, 16), ::testing::ContainerEq(TagsVec{0})); in TEST()
47 EXPECT_THAT(tag_map.GetTags(0, 32), ::testing::ContainerEq(TagsVec{0, 1})); in TEST()
51 ::testing::ContainerEq(TagsVec{0, 1, std::nullopt})); in TEST()
54 ::testing::ContainerEq(TagsVec{1, std::nullopt})); in TEST()
57 EXPECT_THAT(tag_map.GetTags(32, 16), ::testing::ContainerEq(TagsVec{})); in TEST()
62 EXPECT_THAT(tag_map.GetTags(8, 8), ::testing::ContainerEq(TagsVec{0})); in TEST()
64 EXPECT_THAT(tag_map.GetTags(30, 2), ::testing::ContainerEq(TagsVec{1})); in TEST()
69 ::testing::ContainerEq(TagsVec{1, std::nullopt})); in TEST()
77 ::testing::ContainerEq(TagsVec{std::nullopt, 3})); in TEST()
81 ::testing::ContainerEq(TagsVec{1, std::nullopt, 3})); in TEST()
/llvm-project/libc/test/UnitTest/
H A DFPMatcher.h28 namespace testing {
188 static constexpr fputil::testing::RoundingMode ROUNDING_MODES[4] = {
189 fputil::testing::RoundingMode::Nearest,
190 fputil::testing::RoundingMode::Upward,
191 fputil::testing::RoundingMode::Downward,
192 fputil::testing::RoundingMode::TowardZero,
221 } // namespace testing
253 EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcher< \
254 LIBC_NAMESPACE::testing::TestCond::EQ>(expected))
257 EXPECT_THAT(actual, LIBC_NAMESPACE::testing
[all...]
H A DMemoryMatcher.h18 namespace testing {
22 } // namespace testing
29 LIBC_NAMESPACE::testing::MemoryView e = (expected); \
30 LIBC_NAMESPACE::testing::MemoryView a = (actual); \
37 LIBC_NAMESPACE::testing::MemoryView e = (expected); \
38 LIBC_NAMESPACE::testing::MemoryView a = (actual); \
46 namespace testing {
62 } // namespace testing
66 EXPECT_THAT(actual, LIBC_NAMESPACE::testing::MemoryMatcher(expected))
68 ASSERT_THAT(actual, LIBC_NAMESPACE::testing
[all...]
/llvm-project/llvm/unittests/Transforms/Instrumentation/
H A DPGOInstrumentationTest.cpp24 using testing::_;
25 using ::testing::DoDefault;
26 using ::testing::Invoke;
27 using ::testing::NotNull;
28 using ::testing::Ref;
29 using ::testing::Return;
30 using ::testing::Sequence;
31 using ::testing::Test;
32 using ::testing::TestParamInfo;
33 using ::testing
[all...]
/llvm-project/clang/unittests/Basic/
H A DSarifTest.cpp41 class SarifDocumentWriterTest : public ::testing::Test {
90 ASSERT_THAT(Keys, testing::UnorderedElementsAre("$schema", "version")); in TEST_F()
108 ASSERT_THAT(Runs, testing::NotNull()); in TEST_F()
116 ASSERT_THAT(Driver, testing::NotNull()); in TEST_F()
142 auto Matcher = ::testing::AnyOf( in TEST_F()
143 ::testing::HasSubstr("create a run first"), in TEST_F()
144 ::testing::HasSubstr("no runs associated with the document")); in TEST_F()
162 ::testing::HasSubstr("Rule rank cannot be smaller than 0.0")); in TEST_F()
164 ::testing::HasSubstr("Rule rank cannot be larger than 100.0")); in TEST_F()
186 ::testing in TEST_F()
[all...]
/llvm-project/llvm/unittests/ExecutionEngine/JITLink/
H A DAArch32ErrorTests.cpp37 class AArch32Errors : public testing::Test {
97 FailedWithMessage(testing::HasSubstr( in TEST_F()
116 FailedWithMessage(testing::AllOf( in TEST()
117 testing::StartsWith("Invalid opcode"), in TEST()
118 testing::EndsWith(aarch32::getEdgeKindName(K))))); in TEST()
141 FailedWithMessage(testing::AllOf( in TEST()
142 testing::StartsWith("Invalid opcode"), in TEST()
143 testing::EndsWith(aarch32::getEdgeKindName(K))))); in TEST()
160 FailedWithMessage(testing::HasSubstr( in TEST_F()
181 FailedWithMessage(testing in TEST()
[all...]
/llvm-project/llvm/include/llvm/Testing/ADT/
H A DStringMapEntry.h47 : public testing::MatcherInterface<StringMapEntryT> {
55 testing::SafeMatcherCast<const std::string &>(KeyMatcherArg)),
57 testing::SafeMatcherCast<const ValueT &>(ValueMatcherArg)) {}
75 testing::MatchResultListener *ResultListener) const override {
76 testing::StringMatchResultListener KeyListener;
83 testing::StringMatchResultListener ValueListener;
95 const testing::Matcher<const std::string &> KeyMatcher;
96 const testing::Matcher<const ValueT &> ValueMatcher;
106 operator testing::Matcher<StringMapEntryT>() const { // NOLINT
107 return testing::Matcher<StringMapEntryT>(

12345678910>>...64