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

Side by Side Diff: runtime/vm/trace_buffer_test.cc

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/timeline_test.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/globals.h" 6 #include "vm/globals.h"
7 #include "vm/json_stream.h" 7 #include "vm/json_stream.h"
8 #include "vm/trace_buffer.h" 8 #include "vm/trace_buffer.h"
9 #include "vm/unit_test.h" 9 #include "vm/unit_test.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 #ifndef PRODUCT
14
13 TEST_CASE(TraceBufferEmpty) { 15 TEST_CASE(TraceBufferEmpty) {
14 Isolate* isolate = Isolate::Current(); 16 Isolate* isolate = Isolate::Current();
15 TraceBuffer::Init(isolate, 3); 17 TraceBuffer::Init(isolate, 3);
16 TraceBuffer* trace_buffer = isolate->trace_buffer(); 18 TraceBuffer* trace_buffer = isolate->trace_buffer();
17 { 19 {
18 JSONStream js; 20 JSONStream js;
19 trace_buffer->PrintToJSONStream(&js); 21 trace_buffer->PrintToJSONStream(&js);
20 EXPECT_STREQ("{\"type\":\"TraceBuffer\",\"members\":[]}", js.ToCString()); 22 EXPECT_STREQ("{\"type\":\"TraceBuffer\",\"members\":[]}", js.ToCString());
21 } 23 }
22 delete trace_buffer; 24 delete trace_buffer;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 TraceBuffer* trace_buffer = isolate->trace_buffer(); 98 TraceBuffer* trace_buffer = isolate->trace_buffer();
97 trace_buffer->TraceF("foo %d %s", 99, "bar"); 99 trace_buffer->TraceF("foo %d %s", 99, "bar");
98 { 100 {
99 JSONStream js; 101 JSONStream js;
100 trace_buffer->PrintToJSONStream(&js); 102 trace_buffer->PrintToJSONStream(&js);
101 EXPECT_SUBSTRING("foo 99 bar", js.ToCString()); 103 EXPECT_SUBSTRING("foo 99 bar", js.ToCString());
102 } 104 }
103 delete trace_buffer; 105 delete trace_buffer;
104 } 106 }
105 107
108 #endif // !PRODUCT
109
106 } // namespace dart 110 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/timeline_test.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698