OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include <stddef.h> |
5 #include <stdint.h> | 6 #include <stdint.h> |
6 #include <string.h> | 7 #include <string.h> |
7 #include <map> | 8 #include <map> |
8 | 9 |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "tools/android/heap_profiler/heap_profiler.h" | 11 #include "tools/android/heap_profiler/heap_profiler.h" |
11 | 12 |
12 namespace { | 13 namespace { |
13 | 14 |
14 class HeapProfilerTest : public testing::Test { | 15 class HeapProfilerTest : public testing::Test { |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 EXPECT_EQ(4096u, stats_.total_alloc_bytes); | 449 EXPECT_EQ(4096u, stats_.total_alloc_bytes); |
449 | 450 |
450 heap_profiler_free((void*)0xfffffffffffff000L, 4096, NULL); | 451 heap_profiler_free((void*)0xfffffffffffff000L, 4096, NULL); |
451 EXPECT_EQ(0u, stats_.num_allocs); | 452 EXPECT_EQ(0u, stats_.num_allocs); |
452 EXPECT_EQ(0u, stats_.num_stack_traces); | 453 EXPECT_EQ(0u, stats_.num_stack_traces); |
453 EXPECT_EQ(0u, stats_.total_alloc_bytes); | 454 EXPECT_EQ(0u, stats_.total_alloc_bytes); |
454 } | 455 } |
455 #endif | 456 #endif |
456 | 457 |
457 } // namespace | 458 } // namespace |
OLD | NEW |