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

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

Issue 42387: Change the socket close to shutdown (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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 | « src/platform-win32.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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 // Wait until data is received. 99 // Wait until data is received.
100 listener->Join(); 100 listener->Join();
101 101
102 // Check that data received is the same as data send. 102 // Check that data received is the same as data send.
103 for (int i = 0; i < len; i++) { 103 for (int i = 0; i < len; i++) {
104 CHECK(data[i] == listener->data()[i]); 104 CHECK(data[i] == listener->data()[i]);
105 } 105 }
106 106
107 // Close the client before the listener to avoid TIME_WAIT issues. 107 // Close the client before the listener to avoid TIME_WAIT issues.
108 client->Close(); 108 client->Shutdown();
109 delete client; 109 delete client;
110 delete listener; 110 delete listener;
111 } 111 }
112 112
113 113
114 TEST(Socket) { 114 TEST(Socket) {
115 bool ok; 115 bool ok;
116 116
117 // Initialize socket support. 117 // Initialize socket support.
118 ok = Socket::Setup(); 118 ok = Socket::Setup();
(...skipping 24 matching lines...) Expand all
143 } 143 }
144 144
145 145
146 TEST(HToNNToH) { 146 TEST(HToNNToH) {
147 uint16_t x = 1234; 147 uint16_t x = 1234;
148 CHECK_EQ(x, Socket::NToH(Socket::HToN(x))); 148 CHECK_EQ(x, Socket::NToH(Socket::HToN(x)));
149 149
150 uint32_t y = 12345678; 150 uint32_t y = 12345678;
151 CHECK(y == Socket::NToH(Socket::HToN(y))); 151 CHECK(y == Socket::NToH(Socket::HToN(y)));
152 } 152 }
OLDNEW
« no previous file with comments | « src/platform-win32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698