Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Unified Diff: runtime/vm/trace_buffer_test.cc

Issue 327803003: Provide the isolate with a trace buffer, but do not allocate one by default. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/trace_buffer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/trace_buffer_test.cc
===================================================================
--- runtime/vm/trace_buffer_test.cc (revision 37183)
+++ runtime/vm/trace_buffer_test.cc (working copy)
@@ -10,9 +10,10 @@
namespace dart {
-
-UNIT_TEST_CASE(TraceBufferEmpty) {
- TraceBuffer* trace_buffer = new TraceBuffer(3);
+TEST_CASE(TraceBufferEmpty) {
+ Isolate* isolate = Isolate::Current();
+ TraceBuffer::Init(isolate, 3);
+ TraceBuffer* trace_buffer = isolate->trace_buffer();
{
JSONStream js;
trace_buffer->PrintToJSONStream(&js);
@@ -22,8 +23,10 @@
}
-UNIT_TEST_CASE(TraceBufferClear) {
- TraceBuffer* trace_buffer = new TraceBuffer(3);
+TEST_CASE(TraceBufferClear) {
+ Isolate* isolate = Isolate::Current();
+ TraceBuffer::Init(isolate, 3);
+ TraceBuffer* trace_buffer = isolate->trace_buffer();
trace_buffer->Trace(kMicrosecondsPerSecond * 1, "abc");
trace_buffer->Clear();
{
@@ -35,8 +38,10 @@
}
-UNIT_TEST_CASE(TraceBufferTrace) {
- TraceBuffer* trace_buffer = new TraceBuffer(3);
+TEST_CASE(TraceBufferTrace) {
+ Isolate* isolate = Isolate::Current();
+ TraceBuffer::Init(isolate, 3);
+ TraceBuffer* trace_buffer = isolate->trace_buffer();
trace_buffer->Trace(kMicrosecondsPerSecond * 1, "abc");
{
@@ -85,8 +90,10 @@
}
-UNIT_TEST_CASE(TraceBufferTraceF) {
- TraceBuffer* trace_buffer = new TraceBuffer(3);
+TEST_CASE(TraceBufferTraceF) {
+ Isolate* isolate = Isolate::Current();
+ TraceBuffer::Init(isolate, 3);
+ TraceBuffer* trace_buffer = isolate->trace_buffer();
trace_buffer->TraceF("foo %d %s", 99, "bar");
{
JSONStream js;
« no previous file with comments | « runtime/vm/trace_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698