From 01c535b0011ef2bfad5697d9b45038f25a917fe2 Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Mon, 20 Oct 2014 12:11:14 -0400 Subject: [PATCH] Move minidump/*_test_util.* to minidump/test. Suggested at https://codereview.chromium.org/654573003/diff/1/minidump/minidump_string_writer_test_util.h#newcode22 TEST=minidump_test R=rsesek@chromium.org Review URL: https://codereview.chromium.org/663093003 --- minidump/minidump.gyp | 16 ++++++++-------- minidump/minidump_context_writer_test.cc | 2 +- minidump/minidump_crashpad_info_writer_test.cc | 4 ++-- minidump/minidump_exception_writer_test.cc | 4 ++-- minidump/minidump_file_writer_test.cc | 2 +- minidump/minidump_memory_writer_test.cc | 4 ++-- minidump/minidump_misc_info_writer_test.cc | 2 +- minidump/minidump_module_writer_test.cc | 2 +- ...idump_simple_string_dictionary_writer_test.cc | 2 +- minidump/minidump_system_info_writer_test.cc | 2 +- minidump/minidump_thread_writer_test.cc | 6 +++--- .../{ => test}/minidump_context_test_util.cc | 2 +- minidump/{ => test}/minidump_context_test_util.h | 6 +++--- .../{ => test}/minidump_file_writer_test_util.cc | 2 +- .../{ => test}/minidump_file_writer_test_util.h | 6 +++--- .../minidump_memory_writer_test_util.cc | 2 +- .../minidump_memory_writer_test_util.h | 6 +++--- .../minidump_string_writer_test_util.cc | 2 +- .../minidump_string_writer_test_util.h | 5 +++++ 19 files changed, 41 insertions(+), 36 deletions(-) rename minidump/{ => test}/minidump_context_test_util.cc (99%) rename minidump/{ => test}/minidump_context_test_util.h (92%) rename minidump/{ => test}/minidump_file_writer_test_util.cc (95%) rename minidump/{ => test}/minidump_file_writer_test_util.h (88%) rename minidump/{ => test}/minidump_memory_writer_test_util.cc (98%) rename minidump/{ => test}/minidump_memory_writer_test_util.h (94%) rename minidump/{ => test}/minidump_string_writer_test_util.cc (96%) rename minidump/{ => test}/minidump_string_writer_test_util.h (88%) diff --git a/minidump/minidump.gyp b/minidump/minidump.gyp index 8ea64eff..723ecf0d 100644 --- a/minidump/minidump.gyp +++ b/minidump/minidump.gyp @@ -75,26 +75,26 @@ '..', ], 'sources': [ - 'minidump_context_test_util.cc', - 'minidump_context_test_util.h', 'minidump_context_writer_test.cc', 'minidump_crashpad_info_writer_test.cc', 'minidump_exception_writer_test.cc', 'minidump_file_writer_test.cc', - 'minidump_file_writer_test_util.cc', - 'minidump_file_writer_test_util.h', 'minidump_memory_writer_test.cc', - 'minidump_memory_writer_test_util.cc', - 'minidump_memory_writer_test_util.h', 'minidump_misc_info_writer_test.cc', 'minidump_module_writer_test.cc', 'minidump_simple_string_dictionary_writer_test.cc', 'minidump_string_writer_test.cc', - 'minidump_string_writer_test_util.cc', - 'minidump_string_writer_test_util.h', 'minidump_system_info_writer_test.cc', 'minidump_thread_writer_test.cc', 'minidump_writable_test.cc', + 'test/minidump_context_test_util.cc', + 'test/minidump_context_test_util.h', + 'test/minidump_file_writer_test_util.cc', + 'test/minidump_file_writer_test_util.h', + 'test/minidump_memory_writer_test_util.cc', + 'test/minidump_memory_writer_test_util.h', + 'test/minidump_string_writer_test_util.cc', + 'test/minidump_string_writer_test_util.h', ], }, ], diff --git a/minidump/minidump_context_writer_test.cc b/minidump/minidump_context_writer_test.cc index 559b2e3f..43f64761 100644 --- a/minidump/minidump_context_writer_test.cc +++ b/minidump/minidump_context_writer_test.cc @@ -18,7 +18,7 @@ #include "gtest/gtest.h" #include "minidump/minidump_context.h" -#include "minidump/minidump_context_test_util.h" +#include "minidump/test/minidump_context_test_util.h" #include "util/file/string_file_writer.h" namespace crashpad { diff --git a/minidump/minidump_crashpad_info_writer_test.cc b/minidump/minidump_crashpad_info_writer_test.cc index f0b4e24d..090b4a22 100644 --- a/minidump/minidump_crashpad_info_writer_test.cc +++ b/minidump/minidump_crashpad_info_writer_test.cc @@ -19,9 +19,9 @@ #include "gtest/gtest.h" #include "minidump/minidump_extensions.h" #include "minidump/minidump_file_writer.h" -#include "minidump/minidump_file_writer_test_util.h" #include "minidump/minidump_simple_string_dictionary_writer.h" -#include "minidump/minidump_string_writer_test_util.h" +#include "minidump/test/minidump_file_writer_test_util.h" +#include "minidump/test/minidump_string_writer_test_util.h" #include "util/file/string_file_writer.h" namespace crashpad { diff --git a/minidump/minidump_exception_writer_test.cc b/minidump/minidump_exception_writer_test.cc index 7256d2a4..16cff248 100644 --- a/minidump/minidump_exception_writer_test.cc +++ b/minidump/minidump_exception_writer_test.cc @@ -22,11 +22,11 @@ #include "gtest/gtest.h" #include "minidump/minidump_context.h" -#include "minidump/minidump_context_test_util.h" #include "minidump/minidump_context_writer.h" #include "minidump/minidump_extensions.h" #include "minidump/minidump_file_writer.h" -#include "minidump/minidump_file_writer_test_util.h" +#include "minidump/test/minidump_context_test_util.h" +#include "minidump/test/minidump_file_writer_test_util.h" #include "util/file/string_file_writer.h" namespace crashpad { diff --git a/minidump/minidump_file_writer_test.cc b/minidump/minidump_file_writer_test.cc index 0e925767..3f34287c 100644 --- a/minidump/minidump_file_writer_test.cc +++ b/minidump/minidump_file_writer_test.cc @@ -20,9 +20,9 @@ #include "base/basictypes.h" #include "gtest/gtest.h" -#include "minidump/minidump_file_writer_test_util.h" #include "minidump/minidump_stream_writer.h" #include "minidump/minidump_writable.h" +#include "minidump/test/minidump_file_writer_test_util.h" #include "util/file/file_writer.h" #include "util/file/string_file_writer.h" diff --git a/minidump/minidump_memory_writer_test.cc b/minidump/minidump_memory_writer_test.cc index a59edcd3..cd45b78d 100644 --- a/minidump/minidump_memory_writer_test.cc +++ b/minidump/minidump_memory_writer_test.cc @@ -21,9 +21,9 @@ #include "gtest/gtest.h" #include "minidump/minidump_extensions.h" #include "minidump/minidump_file_writer.h" -#include "minidump/minidump_file_writer_test_util.h" -#include "minidump/minidump_memory_writer_test_util.h" #include "minidump/minidump_stream_writer.h" +#include "minidump/test/minidump_file_writer_test_util.h" +#include "minidump/test/minidump_memory_writer_test_util.h" #include "util/file/string_file_writer.h" namespace crashpad { diff --git a/minidump/minidump_misc_info_writer_test.cc b/minidump/minidump_misc_info_writer_test.cc index 0e31e542..8b3f9546 100644 --- a/minidump/minidump_misc_info_writer_test.cc +++ b/minidump/minidump_misc_info_writer_test.cc @@ -24,7 +24,7 @@ #include "base/strings/utf_string_conversions.h" #include "gtest/gtest.h" #include "minidump/minidump_file_writer.h" -#include "minidump/minidump_file_writer_test_util.h" +#include "minidump/test/minidump_file_writer_test_util.h" #include "util/file/string_file_writer.h" #include "util/stdlib/strlcpy.h" diff --git a/minidump/minidump_module_writer_test.cc b/minidump/minidump_module_writer_test.cc index 38e059e5..c393da47 100644 --- a/minidump/minidump_module_writer_test.cc +++ b/minidump/minidump_module_writer_test.cc @@ -22,7 +22,7 @@ #include "gtest/gtest.h" #include "minidump/minidump_extensions.h" #include "minidump/minidump_file_writer.h" -#include "minidump/minidump_file_writer_test_util.h" +#include "minidump/test/minidump_file_writer_test_util.h" #include "util/file/string_file_writer.h" #include "util/misc/uuid.h" diff --git a/minidump/minidump_simple_string_dictionary_writer_test.cc b/minidump/minidump_simple_string_dictionary_writer_test.cc index a63cfb33..c72c04c5 100644 --- a/minidump/minidump_simple_string_dictionary_writer_test.cc +++ b/minidump/minidump_simple_string_dictionary_writer_test.cc @@ -18,7 +18,7 @@ #include "gtest/gtest.h" #include "minidump/minidump_extensions.h" -#include "minidump/minidump_string_writer_test_util.h" +#include "minidump/test/minidump_string_writer_test_util.h" #include "util/file/string_file_writer.h" namespace crashpad { diff --git a/minidump/minidump_system_info_writer_test.cc b/minidump/minidump_system_info_writer_test.cc index 470cef69..9c45416a 100644 --- a/minidump/minidump_system_info_writer_test.cc +++ b/minidump/minidump_system_info_writer_test.cc @@ -21,7 +21,7 @@ #include "gtest/gtest.h" #include "minidump/minidump_file_writer.h" -#include "minidump/minidump_file_writer_test_util.h" +#include "minidump/test/minidump_file_writer_test_util.h" #include "util/file/string_file_writer.h" namespace crashpad { diff --git a/minidump/minidump_thread_writer_test.cc b/minidump/minidump_thread_writer_test.cc index 27f290eb..15f1a07c 100644 --- a/minidump/minidump_thread_writer_test.cc +++ b/minidump/minidump_thread_writer_test.cc @@ -17,12 +17,12 @@ #include #include "gtest/gtest.h" -#include "minidump/minidump_context_test_util.h" #include "minidump/minidump_context_writer.h" #include "minidump/minidump_memory_writer.h" -#include "minidump/minidump_memory_writer_test_util.h" #include "minidump/minidump_file_writer.h" -#include "minidump/minidump_file_writer_test_util.h" +#include "minidump/test/minidump_context_test_util.h" +#include "minidump/test/minidump_memory_writer_test_util.h" +#include "minidump/test/minidump_file_writer_test_util.h" #include "util/file/string_file_writer.h" namespace crashpad { diff --git a/minidump/minidump_context_test_util.cc b/minidump/test/minidump_context_test_util.cc similarity index 99% rename from minidump/minidump_context_test_util.cc rename to minidump/test/minidump_context_test_util.cc index 18c2b142..18995eaa 100644 --- a/minidump/minidump_context_test_util.cc +++ b/minidump/test/minidump_context_test_util.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "minidump/minidump_context_test_util.h" +#include "minidump/test/minidump_context_test_util.h" #include "base/basictypes.h" #include "gtest/gtest.h" diff --git a/minidump/minidump_context_test_util.h b/minidump/test/minidump_context_test_util.h similarity index 92% rename from minidump/minidump_context_test_util.h rename to minidump/test/minidump_context_test_util.h index 1db974db..53455bcd 100644 --- a/minidump/minidump_context_test_util.h +++ b/minidump/test/minidump_context_test_util.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_TEST_UTIL_H_ -#define CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_TEST_UTIL_H_ +#ifndef CRASHPAD_MINIDUMP_TEST_MINIDUMP_CONTEXT_TEST_UTIL_H_ +#define CRASHPAD_MINIDUMP_TEST_MINIDUMP_CONTEXT_TEST_UTIL_H_ #include @@ -58,4 +58,4 @@ void ExpectMinidumpContextAMD64(uint32_t expect_seed, } // namespace test } // namespace crashpad -#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_TEST_UTIL_H_ +#endif // CRASHPAD_MINIDUMP_TEST_MINIDUMP_CONTEXT_TEST_UTIL_H_ diff --git a/minidump/minidump_file_writer_test_util.cc b/minidump/test/minidump_file_writer_test_util.cc similarity index 95% rename from minidump/minidump_file_writer_test_util.cc rename to minidump/test/minidump_file_writer_test_util.cc index 01cb6eb2..6757692f 100644 --- a/minidump/minidump_file_writer_test_util.cc +++ b/minidump/test/minidump_file_writer_test_util.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "minidump/minidump_file_writer_test_util.h" +#include "minidump/test/minidump_file_writer_test_util.h" #include "gtest/gtest.h" diff --git a/minidump/minidump_file_writer_test_util.h b/minidump/test/minidump_file_writer_test_util.h similarity index 88% rename from minidump/minidump_file_writer_test_util.h rename to minidump/test/minidump_file_writer_test_util.h index b610f8d1..d0c9e3ac 100644 --- a/minidump/minidump_file_writer_test_util.h +++ b/minidump/test/minidump_file_writer_test_util.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_MINIDUMP_MINIDUMP_FILE_WRITER_TEST_UTIL_H_ -#define CRASHPAD_MINIDUMP_MINIDUMP_FILE_WRITER_TEST_UTIL_H_ +#ifndef CRASHPAD_MINIDUMP_TEST_MINIDUMP_FILE_WRITER_TEST_UTIL_H_ +#define CRASHPAD_MINIDUMP_TEST_MINIDUMP_FILE_WRITER_TEST_UTIL_H_ #include #include @@ -38,4 +38,4 @@ void VerifyMinidumpHeader(const MINIDUMP_HEADER* header, } // namespace test } // namespace crashpad -#endif // CRASHPAD_MINIDUMP_MINIDUMP_FILE_WRITER_TEST_UTIL_H_ +#endif // CRASHPAD_MINIDUMP_TEST_MINIDUMP_FILE_WRITER_TEST_UTIL_H_ diff --git a/minidump/minidump_memory_writer_test_util.cc b/minidump/test/minidump_memory_writer_test_util.cc similarity index 98% rename from minidump/minidump_memory_writer_test_util.cc rename to minidump/test/minidump_memory_writer_test_util.cc index c7b0c3c5..472a1a32 100644 --- a/minidump/minidump_memory_writer_test_util.cc +++ b/minidump/test/minidump_memory_writer_test_util.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "minidump/minidump_memory_writer_test_util.h" +#include "minidump/test/minidump_memory_writer_test_util.h" #include "gtest/gtest.h" diff --git a/minidump/minidump_memory_writer_test_util.h b/minidump/test/minidump_memory_writer_test_util.h similarity index 94% rename from minidump/minidump_memory_writer_test_util.h rename to minidump/test/minidump_memory_writer_test_util.h index 5299f687..8e4a01b6 100644 --- a/minidump/minidump_memory_writer_test_util.h +++ b/minidump/test/minidump_memory_writer_test_util.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CRASHPAD_MINIDUMP_MINIDUMP_MEMORY_WRITER_TEST_UTIL_H_ -#define CRASHPAD_MINIDUMP_MINIDUMP_MEMORY_WRITER_TEST_UTIL_H_ +#ifndef CRASHPAD_MINIDUMP_TEST_MINIDUMP_MEMORY_WRITER_TEST_UTIL_H_ +#define CRASHPAD_MINIDUMP_TEST_MINIDUMP_MEMORY_WRITER_TEST_UTIL_H_ #include "minidump/minidump_memory_writer.h" @@ -101,4 +101,4 @@ void ExpectMinidumpMemoryDescriptorAndContents( } // namespace test } // namespace crashpad -#endif // CRASHPAD_MINIDUMP_MINIDUMP_MEMORY_WRITER_TEST_UTIL_H_ +#endif // CRASHPAD_MINIDUMP_TEST_MINIDUMP_MEMORY_WRITER_TEST_UTIL_H_ diff --git a/minidump/minidump_string_writer_test_util.cc b/minidump/test/minidump_string_writer_test_util.cc similarity index 96% rename from minidump/minidump_string_writer_test_util.cc rename to minidump/test/minidump_string_writer_test_util.cc index 7914c68a..5afecb58 100644 --- a/minidump/minidump_string_writer_test_util.cc +++ b/minidump/test/minidump_string_writer_test_util.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "minidump/minidump_string_writer_test_util.h" +#include "minidump/test/minidump_string_writer_test_util.h" #include "gtest/gtest.h" #include "minidump/minidump_extensions.h" diff --git a/minidump/minidump_string_writer_test_util.h b/minidump/test/minidump_string_writer_test_util.h similarity index 88% rename from minidump/minidump_string_writer_test_util.h rename to minidump/test/minidump_string_writer_test_util.h index db0febcf..5db8eed1 100644 --- a/minidump/minidump_string_writer_test_util.h +++ b/minidump/test/minidump_string_writer_test_util.h @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#ifndef CRASHPAD_MINIDUMP_TEST_MINIDUMP_STRING_WRITER_TEST_UTIL_H_ +#define CRASHPAD_MINIDUMP_TEST_MINIDUMP_STRING_WRITER_TEST_UTIL_H_ + #include #include @@ -40,3 +43,5 @@ std::string MinidumpUTF8StringAtRVA(const StringFileWriter& file_writer, } // namespace test } // namespace crashpad + +#endif // CRASHPAD_MINIDUMP_TEST_MINIDUMP_STRING_WRITER_TEST_UTIL_H_