Skip to content

Commit be8416c

Browse files
committed
Make test output more verbose
1 parent 16e6bc6 commit be8416c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/mutator_test.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ std::vector<std::string> Split(const std::string& str) {
276276
return result;
277277
}
278278

279-
using TestParams = std::tuple<const protobuf::Message*, const char*, size_t>;
279+
using TestParams =
280+
std::tuple<const protobuf::Message*, const char*, size_t, std::string>;
280281

281282
template <class T>
282283
std::vector<TestParams> GetFieldTestParams(
@@ -286,7 +287,8 @@ std::vector<TestParams> GetFieldTestParams(
286287
auto lines = Split(t);
287288
for (size_t i = 0; i != lines.size(); ++i) {
288289
if (lines[i].find(':') != std::string::npos)
289-
results.push_back(std::make_tuple(&T::default_instance(), t, i));
290+
results.push_back(
291+
std::make_tuple(&T::default_instance(), t, i, lines[i]));
290292
}
291293
}
292294
return results;
@@ -300,7 +302,8 @@ std::vector<TestParams> GetMessageTestParams(
300302
auto lines = Split(t);
301303
for (size_t i = 0; i != lines.size(); ++i) {
302304
if (lines[i].find("{}") != std::string::npos)
303-
results.push_back(std::make_tuple(&T::default_instance(), t, i));
305+
results.push_back(
306+
std::make_tuple(&T::default_instance(), t, i, lines[i]));
304307
}
305308
}
306309
return results;

0 commit comments

Comments
 (0)