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

Side by Side Diff: test/cctest/test-sockets.cc

Issue 11015008: Fix cctests using Sockets to be able to run in parallel (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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-debug.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 2
3 #include "v8.h" 3 #include "v8.h"
4 #include "platform.h" 4 #include "platform.h"
5 #include "cctest.h" 5 #include "cctest.h"
6 6
7 7
8 using namespace ::v8::internal; 8 using namespace ::v8::internal;
9 9
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Close the client before the listener to avoid TIME_WAIT issues. 117 // Close the client before the listener to avoid TIME_WAIT issues.
118 client->Shutdown(); 118 client->Shutdown();
119 delete client; 119 delete client;
120 delete listener; 120 delete listener;
121 } 121 }
122 122
123 123
124 TEST(Socket) { 124 TEST(Socket) {
125 // Make sure this port is not used by other tests to allow tests to run in 125 // Make sure this port is not used by other tests to allow tests to run in
126 // parallel. 126 // parallel.
127 static const int kPort = 5859; 127 static const int kPort = 5859 + FlagDependentPortOffset();
128 128
129 bool ok; 129 bool ok;
130 130
131 // Initialize socket support. 131 // Initialize socket support.
132 ok = Socket::SetUp(); 132 ok = Socket::SetUp();
133 CHECK(ok); 133 CHECK(ok);
134 134
135 // Send and receive some data. 135 // Send and receive some data.
136 static const int kBufferSizeSmall = 20; 136 static const int kBufferSizeSmall = 20;
137 char small_data[kBufferSizeSmall + 1] = "1234567890abcdefghij"; 137 char small_data[kBufferSizeSmall + 1] = "1234567890abcdefghij";
(...skipping 19 matching lines...) Expand all
157 } 157 }
158 158
159 159
160 TEST(HToNNToH) { 160 TEST(HToNNToH) {
161 uint16_t x = 1234; 161 uint16_t x = 1234;
162 CHECK_EQ(x, Socket::NToH(Socket::HToN(x))); 162 CHECK_EQ(x, Socket::NToH(Socket::HToN(x)));
163 163
164 uint32_t y = 12345678; 164 uint32_t y = 12345678;
165 CHECK(y == Socket::NToH(Socket::HToN(y))); 165 CHECK(y == Socket::NToH(Socket::HToN(y)));
166 } 166 }
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698