OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "minidump/minidump_stream_writer.h" | 25 #include "minidump/minidump_stream_writer.h" |
26 #include "minidump/minidump_writable.h" | 26 #include "minidump/minidump_writable.h" |
27 #include "minidump/test/minidump_file_writer_test_util.h" | 27 #include "minidump/test/minidump_file_writer_test_util.h" |
28 #include "minidump/test/minidump_writable_test_util.h" | 28 #include "minidump/test/minidump_writable_test_util.h" |
29 #include "snapshot/test/test_cpu_context.h" | 29 #include "snapshot/test/test_cpu_context.h" |
30 #include "snapshot/test/test_exception_snapshot.h" | 30 #include "snapshot/test/test_exception_snapshot.h" |
31 #include "snapshot/test/test_module_snapshot.h" | 31 #include "snapshot/test/test_module_snapshot.h" |
32 #include "snapshot/test/test_process_snapshot.h" | 32 #include "snapshot/test/test_process_snapshot.h" |
33 #include "snapshot/test/test_system_snapshot.h" | 33 #include "snapshot/test/test_system_snapshot.h" |
34 #include "snapshot/test/test_thread_snapshot.h" | 34 #include "snapshot/test/test_thread_snapshot.h" |
| 35 #include "test/gtest_death_check.h" |
35 #include "util/file/string_file.h" | 36 #include "util/file/string_file.h" |
36 #include "util/test/gtest_death_check.h" | |
37 | 37 |
38 namespace crashpad { | 38 namespace crashpad { |
39 namespace test { | 39 namespace test { |
40 namespace { | 40 namespace { |
41 | 41 |
42 TEST(MinidumpFileWriter, Empty) { | 42 TEST(MinidumpFileWriter, Empty) { |
43 MinidumpFileWriter minidump_file; | 43 MinidumpFileWriter minidump_file; |
44 StringFile string_file; | 44 StringFile string_file; |
45 ASSERT_TRUE(minidump_file.WriteEverything(&string_file)); | 45 ASSERT_TRUE(minidump_file.WriteEverything(&string_file)); |
46 ASSERT_EQ(sizeof(MINIDUMP_HEADER), string_file.string().size()); | 46 ASSERT_EQ(sizeof(MINIDUMP_HEADER), string_file.string().size()); |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 const uint8_t kStream1Value = 0xa5; | 436 const uint8_t kStream1Value = 0xa5; |
437 auto stream1 = make_scoped_ptr( | 437 auto stream1 = make_scoped_ptr( |
438 new TestStream(kStream1Type, kStream1Size, kStream1Value)); | 438 new TestStream(kStream1Type, kStream1Size, kStream1Value)); |
439 ASSERT_DEATH_CHECK(minidump_file.AddStream(stream1.Pass()), | 439 ASSERT_DEATH_CHECK(minidump_file.AddStream(stream1.Pass()), |
440 "already present"); | 440 "already present"); |
441 } | 441 } |
442 | 442 |
443 } // namespace | 443 } // namespace |
444 } // namespace test | 444 } // namespace test |
445 } // namespace crashpad | 445 } // namespace crashpad |
OLD | NEW |