@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2021 Jonathan Schleifer + * Copyright (c) 2008-2022 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -17,19 +17,19 @@ #include #import "TestsAppDelegate.h" -static OFString *module = @"OFTCPSocket"; +static OFString *const module = @"OFTCPSocket"; @implementation TestsAppDelegate (OFTCPSocketTests) - (void)TCPSocketTests { void *pool = objc_autoreleasePoolPush(); OFTCPSocket *server, *client = nil, *accepted; uint16_t port; - char buf[6]; + char buffer[6]; TEST(@"+[socket]", (server = [OFTCPSocket socket]) && (client = [OFTCPSocket socket])) TEST(@"-[bindToHost:port:]", @@ -44,14 +44,14 @@ TEST(@"-[remoteAddress]", [OFSocketAddressString(accepted.remoteAddress) isEqual: @"127.0.0.1"]) - TEST(@"-[writeString:]", [client writeString: @"Hello!"]) + TEST(@"-[writeString:]", R([client writeString: @"Hello!"])) TEST(@"-[readIntoBuffer:length:]", - [accepted readIntoBuffer: buf length: 6] && - !memcmp(buf, "Hello!", 6)) + [accepted readIntoBuffer: buffer length: 6] && + !memcmp(buffer, "Hello!", 6)) objc_autoreleasePoolPop(pool); } @end