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

Side by Side Diff: test/cctest/test-unbound-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-profile-generator.cc ('k') | test/mjsunit/external-array.js » ('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 unbound queue. 3 // Tests of the unbound queue.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 #include "unbound-queue-inl.h" 6 #include "unbound-queue-inl.h"
7 #include "cctest.h" 7 #include "cctest.h"
8 8
9 namespace i = v8::internal;
10
11 using i::UnboundQueue; 9 using i::UnboundQueue;
12 10
13 11
14 TEST(SingleRecord) { 12 TEST(SingleRecord) {
15 typedef int Record; 13 typedef int Record;
16 UnboundQueue<Record> cq; 14 UnboundQueue<Record> cq;
17 CHECK(cq.IsEmpty()); 15 CHECK(cq.IsEmpty());
18 cq.Enqueue(1); 16 cq.Enqueue(1);
19 CHECK(!cq.IsEmpty()); 17 CHECK(!cq.IsEmpty());
20 Record rec = 0; 18 Record rec = 0;
(...skipping 24 matching lines...) Expand all
45 CHECK(!cq.IsEmpty()); 43 CHECK(!cq.IsEmpty());
46 } 44 }
47 for (int i = 5; i <= 12; ++i) { 45 for (int i = 5; i <= 12; ++i) {
48 CHECK(!cq.IsEmpty()); 46 CHECK(!cq.IsEmpty());
49 cq.Dequeue(&rec); 47 cq.Dequeue(&rec);
50 CHECK_EQ(i, rec); 48 CHECK_EQ(i, rec);
51 } 49 }
52 CHECK(cq.IsEmpty()); 50 CHECK(cq.IsEmpty());
53 } 51 }
54 52
OLDNEW
« no previous file with comments | « test/cctest/test-profile-generator.cc ('k') | test/mjsunit/external-array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698