From bf830ade7f4d45ab884b8c56631db7d7b4b5c077 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Mon, 10 Aug 2015 12:12:39 -0700 Subject: [PATCH] Omit comment when reading --gtest_list_tests option's output. Gtest add comments when listing typed tests. And we should omit them. Bug: 23040880 Change-Id: If6034af301337fc06eeab294d2dbe5317a6b7f91 --- tests/gtest_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gtest_main.cpp b/tests/gtest_main.cpp index 692b7e883..35211da06 100644 --- a/tests/gtest_main.cpp +++ b/tests/gtest_main.cpp @@ -256,7 +256,7 @@ static bool EnumerateTests(int argc, char** argv, std::vector& testcas while (*p != '\0' && isspace(*p)) { ++p; } - if (*p != '\0') { + if (*p != '\0' && *p != '#') { // This is not we want, gtest must meet with some error when parsing the arguments. fprintf(stderr, "argument error, check with --help\n"); return false;