~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gtest/src/gtest-matchers.cc

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
// This file implements just enough of the matcher interface to allow
33
33
// EXPECT_DEATH and friends to accept a matcher argument.
34
34
 
 
35
#include "gtest/gtest-matchers.h"
 
36
 
 
37
#include <string>
 
38
 
35
39
#include "gtest/internal/gtest-internal.h"
36
40
#include "gtest/internal/gtest-port.h"
37
 
#include "gtest/gtest-matchers.h"
38
 
 
39
 
#include <string>
40
41
 
41
42
namespace testing {
42
43
 
58
59
// s.
59
60
Matcher<std::string>::Matcher(const char* s) { *this = Eq(std::string(s)); }
60
61
 
61
 
#if GTEST_HAS_ABSL
62
 
// Constructs a matcher that matches a const absl::string_view& whose value is
 
62
#if GTEST_INTERNAL_HAS_STRING_VIEW
 
63
// Constructs a matcher that matches a const StringView& whose value is
63
64
// equal to s.
64
 
Matcher<const absl::string_view&>::Matcher(const std::string& s) {
 
65
Matcher<const internal::StringView&>::Matcher(const std::string& s) {
65
66
  *this = Eq(s);
66
67
}
67
68
 
68
 
// Constructs a matcher that matches a const absl::string_view& whose value is
69
 
// equal to s.
70
 
Matcher<const absl::string_view&>::Matcher(const char* s) {
71
 
  *this = Eq(std::string(s));
72
 
}
73
 
 
74
 
// Constructs a matcher that matches a const absl::string_view& whose value is
75
 
// equal to s.
76
 
Matcher<const absl::string_view&>::Matcher(absl::string_view s) {
77
 
  *this = Eq(std::string(s));
78
 
}
79
 
 
80
 
// Constructs a matcher that matches a absl::string_view whose value is equal to
81
 
// s.
82
 
Matcher<absl::string_view>::Matcher(const std::string& s) { *this = Eq(s); }
83
 
 
84
 
// Constructs a matcher that matches a absl::string_view whose value is equal to
85
 
// s.
86
 
Matcher<absl::string_view>::Matcher(const char* s) {
87
 
  *this = Eq(std::string(s));
88
 
}
89
 
 
90
 
// Constructs a matcher that matches a absl::string_view whose value is equal to
91
 
// s.
92
 
Matcher<absl::string_view>::Matcher(absl::string_view s) {
93
 
  *this = Eq(std::string(s));
94
 
}
95
 
#endif  // GTEST_HAS_ABSL
 
69
// Constructs a matcher that matches a const StringView& whose value is
 
70
// equal to s.
 
71
Matcher<const internal::StringView&>::Matcher(const char* s) {
 
72
  *this = Eq(std::string(s));
 
73
}
 
74
 
 
75
// Constructs a matcher that matches a const StringView& whose value is
 
76
// equal to s.
 
77
Matcher<const internal::StringView&>::Matcher(internal::StringView s) {
 
78
  *this = Eq(std::string(s));
 
79
}
 
80
 
 
81
// Constructs a matcher that matches a StringView whose value is equal to
 
82
// s.
 
83
Matcher<internal::StringView>::Matcher(const std::string& s) { *this = Eq(s); }
 
84
 
 
85
// Constructs a matcher that matches a StringView whose value is equal to
 
86
// s.
 
87
Matcher<internal::StringView>::Matcher(const char* s) {
 
88
  *this = Eq(std::string(s));
 
89
}
 
90
 
 
91
// Constructs a matcher that matches a StringView whose value is equal to
 
92
// s.
 
93
Matcher<internal::StringView>::Matcher(internal::StringView s) {
 
94
  *this = Eq(std::string(s));
 
95
}
 
96
#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
96
97
 
97
98
}  // namespace testing