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

Unified Diff: test/cctest/test-socket.cc

Issue 151603004: A64: Synchronize with r16587. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | test/cctest/test-sockets.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-socket.cc
diff --git a/test/cctest/test-sockets.cc b/test/cctest/test-socket.cc
similarity index 94%
rename from test/cctest/test-sockets.cc
rename to test/cctest/test-socket.cc
index 87a62cee9a9baaeca09fcc06555ecb52748c3b1e..47d8b178312646e7c6e8c81c552ef5ac605ae824 100644
--- a/test/cctest/test-sockets.cc
+++ b/test/cctest/test-socket.cc
@@ -27,6 +27,7 @@
#include "v8.h"
#include "platform.h"
+#include "platform/socket.h"
#include "cctest.h"
@@ -69,7 +70,7 @@ void SocketListenerThread::Run() {
bool ok;
// Create the server socket and bind it to the requested port.
- server_ = OS::CreateSocket();
+ server_ = new Socket;
server_->SetReuseAddress(true);
CHECK(server_ != NULL);
ok = server_->Bind(port_);
@@ -121,7 +122,7 @@ static void SendAndReceive(int port, char *data, int len) {
listener->WaitForListening();
// Connect and write some data.
- Socket* client = OS::CreateSocket();
+ Socket* client = new Socket;
CHECK(client != NULL);
ok = client->Connect(kLocalhost, port_str);
CHECK(ok);
@@ -150,12 +151,6 @@ TEST(Socket) {
// parallel.
static const int kPort = 5859 + FlagDependentPortOffset();
- bool ok;
-
- // Initialize socket support.
- ok = Socket::SetUp();
- CHECK(ok);
-
// Send and receive some data.
static const int kBufferSizeSmall = 20;
char small_data[kBufferSizeSmall + 1] = "1234567890abcdefghij";
@@ -179,12 +174,3 @@ TEST(Socket) {
SendAndReceive(kPort, large_data, kBufferSizeLarge);
delete[] large_data;
}
-
-
-TEST(HToNNToH) {
- uint16_t x = 1234;
- CHECK_EQ(x, Socket::NToH(Socket::HToN(x)));
-
- uint32_t y = 12345678;
- CHECK(y == Socket::NToH(Socket::HToN(y)));
-}
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | test/cctest/test-sockets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698