diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-13 20:28:36 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-13 20:28:36 +0000 |
commit | 668a8545f753282e187be8c5df5ad30fe2b1ae84 (patch) | |
tree | 41e03b6df9bfba33adc57cd9b3ae093dbdac32b9 /googletest/src/gtest-typed-test.cc | |
parent | 525b72a0dc9d16e8f9fd9b5be88c1b72715a4681 (diff) | |
parent | 05911fd931cde55ea86bdb12b5706fb5aa570544 (diff) | |
download | googletest-668a8545f753282e187be8c5df5ad30fe2b1ae84.tar.gz |
Snap for 11443790 from 05911fd931cde55ea86bdb12b5706fb5aa570544 to android-games-sdk-game-text-input-releaseandroid-games-sdk-game-text-input-release
Change-Id: I9df8f76955289f1c6b1befe2fcf6744147c0dc30
Diffstat (limited to 'googletest/src/gtest-typed-test.cc')
-rw-r--r-- | googletest/src/gtest-typed-test.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/googletest/src/gtest-typed-test.cc b/googletest/src/gtest-typed-test.cc index c02c3df6..b251c09d 100644 --- a/googletest/src/gtest-typed-test.cc +++ b/googletest/src/gtest-typed-test.cc @@ -27,9 +27,12 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #include "gtest/gtest-typed-test.h" +#include <set> +#include <string> +#include <vector> + #include "gtest/gtest.h" namespace testing { @@ -38,8 +41,7 @@ namespace internal { // Skips to the first non-space char in str. Returns an empty string if str // contains only whitespace characters. static const char* SkipSpaces(const char* str) { - while (IsSpace(*str)) - str++; + while (IsSpace(*str)) str++; return str; } @@ -85,15 +87,14 @@ const char* TypedTestSuitePState::VerifyRegisteredTestNames( } for (RegisteredTestIter it = registered_tests_.begin(); - it != registered_tests_.end(); - ++it) { + it != registered_tests_.end(); ++it) { if (tests.count(it->first) == 0) { errors << "You forgot to list test " << it->first << ".\n"; } } const std::string& errors_str = errors.GetString(); - if (errors_str != "") { + if (!errors_str.empty()) { fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), errors_str.c_str()); fflush(stderr); |