Update googletest to 1.18.0 and SIMDe to 0.8.2.
Googletest 1.18 asks for CMake 3.13 or newer, so configuring the tests no longer warns that CMake compatibility below 3.10 is deprecated. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e4e666f459
commit
3f10e05176
912 changed files with 224964 additions and 11502 deletions
|
|
@ -61,7 +61,7 @@ namespace internal {
|
|||
// Implements the polymorphic IsEmpty matcher, which
|
||||
// can be used as a Matcher<T> as long as T is either a container that defines
|
||||
// empty() and size() (e.g. std::vector or std::string), or a C-style string.
|
||||
class IsEmptyMatcher {
|
||||
class [[nodiscard]] IsEmptyMatcher {
|
||||
public:
|
||||
// Matches anything that defines empty() and size().
|
||||
template <typename MatcheeContainerType>
|
||||
|
|
@ -76,9 +76,22 @@ class IsEmptyMatcher {
|
|||
|
||||
// Matches C-style strings.
|
||||
bool MatchAndExplain(const char* s, MatchResultListener* listener) const {
|
||||
if (s == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return MatchAndExplain(std::string(s), listener);
|
||||
}
|
||||
|
||||
#if GTEST_HAS_STD_WSTRING
|
||||
// Matches C-style wide strings.
|
||||
bool MatchAndExplain(const wchar_t* s, MatchResultListener* listener) const {
|
||||
if (s == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return MatchAndExplain(std::wstring(s), listener);
|
||||
}
|
||||
#endif // GTEST_HAS_STD_WSTRING
|
||||
|
||||
// Describes what this matcher matches.
|
||||
void DescribeTo(std::ostream* os) const { *os << "is empty"; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue