diff options
Diffstat (limited to 'src/tools/windows/dump_syms/dump_syms_unittest.cc')
-rw-r--r-- | src/tools/windows/dump_syms/dump_syms_unittest.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/tools/windows/dump_syms/dump_syms_unittest.cc b/src/tools/windows/dump_syms/dump_syms_unittest.cc index 1ae74a65..5ed512e6 100644 --- a/src/tools/windows/dump_syms/dump_syms_unittest.cc +++ b/src/tools/windows/dump_syms/dump_syms_unittest.cc @@ -121,7 +121,7 @@ void RunCommand(const std::wstring& command_line, STARTUPINFO startup_info = {};
PROCESS_INFORMATION process_info = {};
startup_info.cb = sizeof(STARTUPINFO);
- startup_info.hStdError = child_stdout_write;
+ startup_info.hStdError = NULL;
startup_info.hStdInput = child_stdin_read;
startup_info.hStdOutput = child_stdout_write;
startup_info.dwFlags = STARTF_USESTDHANDLES;
@@ -162,7 +162,7 @@ void GetFileContents(const std::wstring& path, std::string* content) { }
}
-class DumpSymsRegressionTest : public testing::Test {
+class DumpSymsRegressionTest : public testing::TestWithParam<const wchar_t *> {
public:
virtual void SetUp() {
std::wstring self_dir;
@@ -179,9 +179,8 @@ class DumpSymsRegressionTest : public testing::Test { } //namespace
-TEST_F(DumpSymsRegressionTest, EnsureDumpedSymbolsMatch) {
- for (size_t i = 0; i < sizeof(kRootNames) / sizeof(kRootNames[0]); ++i) {
- const wchar_t* root_name = kRootNames[i];
+TEST_P(DumpSymsRegressionTest, EnsureDumpedSymbolsMatch) {
+ const wchar_t* root_name = GetParam();
std::wstring root_path = testdata_dir + L"\\" + root_name;
std::wstring sym_path = root_path + L".sym";
@@ -195,9 +194,12 @@ TEST_F(DumpSymsRegressionTest, EnsureDumpedSymbolsMatch) { ASSERT_NO_FATAL_FAILURE(RunCommand(command_line, &symbols));
EXPECT_EQ(expected_symbols, symbols);
- }
}
+INSTANTIATE_TEST_CASE_P(DumpSyms, DumpSymsRegressionTest,
+ testing::ValuesIn(kRootNames));
+
+
} // namespace dump_syms
} // namespace windows
} // namespace tools |