Skip to content

Commit

Permalink
Fix "make check-api-docs" with Travis CI
Browse files Browse the repository at this point in the history
Document parameters moved into the anonymous namespace in
6e171b0 .

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
  • Loading branch information
ngie-eign committed May 20, 2019
1 parent 6e171b0 commit 38b7189
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
23 changes: 11 additions & 12 deletions engine/googletest_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,23 @@ const std::string name_expr = "([[:alpha:][:digit:]_]+[[:alpha:][:digit:]_/]*)";
/// The separator between a test suite and a test case.
const std::string testsuite_testcase_separator = ".";

/// A complete regular expression representing a line with a test suite
/// definition, e,g.,
/// * "TestSuite."
/// * "TestSuite/Prefix.", or
/// * "TestSuite/Prefix. # TypeParam = .+"
const std::string testsuite_expr =
name_expr + "\\.([[:space:]]+# TypeParam = .+)?";

/// A complete regular expression representing a line with a test case
/// definition, e,g.,
/// * " TestCase"
/// * " TestCase/0"
/// * " TestCase/0 # GetParam() = 4"
const std::string testcase_expr =
" " + name_expr + "([[:space:]]+# GetParam\\(\\) = .+)?";
const std::regex testcase_re(
" " + name_expr + "([[:space:]]+# GetParam\\(\\) = .+)?"
);

const std::regex testcase_re(testcase_expr);
const std::regex testsuite_re(testsuite_expr);
/// A complete regular expression representing a line with a test suite
/// definition, e,g.,
/// * "TestSuite."
/// * "TestSuite/Prefix.", or
/// * "TestSuite/Prefix. # TypeParam = .+"
const std::regex testsuite_re(
name_expr + "\\.([[:space:]]+# TypeParam = .+)?"
);

} // anonymous namespace

Expand Down
17 changes: 14 additions & 3 deletions engine/googletest_result.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,23 @@ using utils::optional;

namespace {

/// Internal string for specifying invalid output.
const std::string invalid_output_message = "invalid output";
const std::regex disabled_re(R"RE((YOU HAVE [[:digit:]]+ DISABLED TESTS?))RE");

/// Regular expression for disabled tests line.
const std::regex disabled_re(
R"RE((YOU HAVE [[:digit:]]+ DISABLED TESTS?))RE"
);

/// Regular expression for starting sentinel of results block.
const std::regex starting_sentinel_re(
R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[A-Za-z0-9]+\.[A-Za-z0-9]+)");
R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[A-Za-z0-9]+\.[A-Za-z0-9]+)"
);

/// Regular expression for ending sentinel of results block.
const std::regex ending_sentinel_re(
R"RE(\[[[:space:]]+(FAILED|OK|SKIPPED)[[:space:]]+\])RE");
R"RE(\[[[:space:]]+(FAILED|OK|SKIPPED)[[:space:]]+\])RE"
);

/// Parses a test result that does not accept a reason.
///
Expand Down

0 comments on commit 38b7189

Please sign in to comment.