Index: runtime/vm/profiler_test.cc |
diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc |
index 63b77d4b97f7107d66fca9789f8dbf2d707022c2..992fada97668f1e638e677719724982739dbf158 100644 |
--- a/runtime/vm/profiler_test.cc |
+++ b/runtime/vm/profiler_test.cc |
@@ -43,7 +43,7 @@ class ProfileSampleBufferTestHelper { |
}; |
-TEST_CASE(ProfilerSampleBufferWrapTest) { |
+TEST_CASE(Profiler_SampleBufferWrapTest) { |
SampleBuffer* sample_buffer = new SampleBuffer(3); |
Isolate* i = reinterpret_cast<Isolate*>(0x1); |
EXPECT_EQ(0, ProfileSampleBufferTestHelper::IterateSumPC(i, *sample_buffer)); |
@@ -68,7 +68,7 @@ TEST_CASE(ProfilerSampleBufferWrapTest) { |
} |
-TEST_CASE(ProfilerSampleBufferIterateTest) { |
+TEST_CASE(Profiler_SampleBufferIterateTest) { |
SampleBuffer* sample_buffer = new SampleBuffer(3); |
Isolate* i = reinterpret_cast<Isolate*>(0x1); |
EXPECT_EQ(0, ProfileSampleBufferTestHelper::IterateCount(i, *sample_buffer)); |
@@ -88,4 +88,16 @@ TEST_CASE(ProfilerSampleBufferIterateTest) { |
delete sample_buffer; |
} |
+ |
+TEST_CASE(Profiler_AllocationSampleTest) { |
+ Isolate* isolate = Isolate::Current(); |
+ SampleBuffer* sample_buffer = new SampleBuffer(3); |
+ Sample* sample = sample_buffer->ReserveSample(); |
+ sample->Init(isolate, 0, 0); |
+ sample->set_metadata(99); |
+ sample->set_is_allocation_sample(true); |
+ EXPECT_EQ(99, sample->allocation_cid()); |
+ delete sample_buffer; |
+} |
+ |
} // namespace dart |