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

Side by Side Diff: test/cctest/test-circular-queue.cc

Issue 7618040: Version 3.5.5. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-cpu-profiler.cc » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // 2 //
3 // Tests of the circular queue. 3 // Tests of the circular queue.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 #include "circular-queue-inl.h" 6 #include "circular-queue-inl.h"
7 #include "cctest.h" 7 #include "cctest.h"
8 8
9 namespace i = v8::internal;
10
11 using i::SamplingCircularQueue; 9 using i::SamplingCircularQueue;
12 10
13 11
14 TEST(SamplingCircularQueue) { 12 TEST(SamplingCircularQueue) {
15 typedef SamplingCircularQueue::Cell Record; 13 typedef SamplingCircularQueue::Cell Record;
16 const int kRecordsPerChunk = 4; 14 const int kRecordsPerChunk = 4;
17 SamplingCircularQueue scq(sizeof(Record), 15 SamplingCircularQueue scq(sizeof(Record),
18 kRecordsPerChunk * sizeof(Record), 16 kRecordsPerChunk * sizeof(Record),
19 3); 17 3);
20 18
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 CHECK_EQ(static_cast<int64_t>(i), static_cast<int64_t>(*rec)); 167 CHECK_EQ(static_cast<int64_t>(i), static_cast<int64_t>(*rec));
170 CHECK_EQ(rec, reinterpret_cast<Record*>(scq.StartDequeue())); 168 CHECK_EQ(rec, reinterpret_cast<Record*>(scq.StartDequeue()));
171 scq.FinishDequeue(); 169 scq.FinishDequeue();
172 CHECK_NE(rec, reinterpret_cast<Record*>(scq.StartDequeue())); 170 CHECK_NE(rec, reinterpret_cast<Record*>(scq.StartDequeue()));
173 } 171 }
174 172
175 CHECK_EQ(NULL, scq.StartDequeue()); 173 CHECK_EQ(NULL, scq.StartDequeue());
176 174
177 delete semaphore; 175 delete semaphore;
178 } 176 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698