Skip to content

Commit

Permalink
avoid matching string_view in RegexMatchCache tests
Browse files Browse the repository at this point in the history
Summary: The gtest `Matcher` class is specialized for `string_view`, but only if it is built with knowledge of `string_view`. Allow building the test without requiring gtest to have knowledge of `string_view`.

Reviewed By: mdas7

Differential Revision: D64812801

fbshipit-source-id: 68eab061b53bbb9b555fd942bf1a88e9c303a27a
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Oct 24, 2024
1 parent ac593b8 commit 6205a9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion folly/container/test/RegexMatchCacheTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,11 @@ struct RegexMatchCacheTest : testing::Test {
}

auto getRegexList(RegexMatchCache const& cache) const {
return cache.getRegexList(keys);
std::vector<std::string> ret;
for (auto const item : cache.getRegexList(keys)) {
ret.emplace_back(item);
}
return ret;
}

auto lookup(RegexMatchCache& cache, std::string_view regex, time_point now) {
Expand Down

0 comments on commit 6205a9c

Please sign in to comment.