Skip to content

Commit f185b92

Browse files
committed
Make better test case names
1 parent a82070c commit f185b92

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/s2/s2region_term_indexer_test.cc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include "absl/container/flat_hash_map.h"
2929
#include "absl/flags/flag.h"
30+
#include "absl/strings/str_cat.h"
3031

3132
#include "s2/base/commandlineflags.h"
3233
#include "s2/base/logging.h"
@@ -44,7 +45,10 @@ S2_DEFINE_int32(iters, 400, "number of iterations for testing");
4445

4546
namespace {
4647

47-
enum DataType { POINT, CAP };
48+
enum DataType {
49+
POINT = 0,
50+
CAP = 1,
51+
};
4852

4953
void TestRandomCaps(const S2RegionTermIndexer::Options& options,
5054
DataType index_type, DataType query_type) {
@@ -147,7 +151,13 @@ INSTANTIATE_TEST_CASE_P(
147151
S2RegionTermIndexerTests, S2RegionTermIndexerTest,
148152
testing::Combine(testing::Values(DataType::POINT, DataType::CAP),
149153
testing::Values(DataType::POINT, DataType::CAP),
150-
testing::Bool(), testing::Bool(), testing::Bool()));
154+
testing::Bool(), testing::Bool(), testing::Bool()),
155+
[](const testing::TestParamInfo<TestCase>& info) {
156+
return absl::StrCat(
157+
"Index", std::get<0>(info.param), "Query", std::get<1>(info.param),
158+
"SpaceOpt", std::get<2>(info.param), "IndexOpt",
159+
std::get<3>(info.param), "QueryOpt", std::get<4>(info.param));
160+
});
151161

152162
TEST_P(S2RegionTermIndexerTest, DefaultParametersValues) {
153163
TestRandomCaps(options, index_type, query_type);

0 commit comments

Comments
 (0)