mirror of
https://github.com/google/googletest.git
synced 2026-02-13 16:45:21 +00:00
Update comment for SizeIs matcher.
Clarify that SizeIs only requires the container to have a size() method, and the argument type can be any type compatible with the return type of size(). The previous comment incorrectly mentioned a requirement for size_type. PiperOrigin-RevId: 869184176 Change-Id: Ib2d867fbfecde0006734772cf07958871a171199
This commit is contained in:
committed by
Copybara-Service
parent
f68374efa7
commit
77f6bd3e75
@@ -4984,9 +4984,9 @@ inline PolymorphicMatcher<internal::TrulyMatcher<Predicate>> Truly(
|
||||
}
|
||||
|
||||
// Returns a matcher that matches the container size. The container must
|
||||
// support both size() and size_type which all STL-like containers provide.
|
||||
// Note that the parameter 'size' can be a value of type size_type as well as
|
||||
// matcher. For instance:
|
||||
// support size() which all STL-like containers provide.
|
||||
// Note that the parameter 'size' can be a value of type returned by size() as
|
||||
// well as a matcher. For instance:
|
||||
// EXPECT_THAT(container, SizeIs(2)); // Checks container has 2 elements.
|
||||
// EXPECT_THAT(container, SizeIs(Le(2)); // Checks container has at most 2.
|
||||
template <typename SizeMatcher>
|
||||
|
||||
Reference in New Issue
Block a user