1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
*
* 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
* the packaging of this file.
*
|
|
|
1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2022 Jonathan Schleifer <js@nil.im>
*
* 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
* the packaging of this file.
*
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
a.sockaddr.in6.sin6_addr.s6_addr[10] = a5 >> 8; \
a.sockaddr.in6.sin6_addr.s6_addr[11] = a5 & 0xFF; \
a.sockaddr.in6.sin6_addr.s6_addr[12] = a6 >> 8; \
a.sockaddr.in6.sin6_addr.s6_addr[13] = a6 & 0xFF; \
a.sockaddr.in6.sin6_addr.s6_addr[14] = a7 >> 8; \
a.sockaddr.in6.sin6_addr.s6_addr[15] = a7 & 0xFF;
static OFString *module = @"Socket";
@implementation TestsAppDelegate (SocketTests)
- (void)socketTests
{
void *pool = objc_autoreleasePoolPush();
OFSocketAddress addr;
TEST(@"Parsing an IPv4",
R(addr = OFSocketAddressParseIP(@"127.0.0.1", 1234)) &&
|
|
|
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
a.sockaddr.in6.sin6_addr.s6_addr[10] = a5 >> 8; \
a.sockaddr.in6.sin6_addr.s6_addr[11] = a5 & 0xFF; \
a.sockaddr.in6.sin6_addr.s6_addr[12] = a6 >> 8; \
a.sockaddr.in6.sin6_addr.s6_addr[13] = a6 & 0xFF; \
a.sockaddr.in6.sin6_addr.s6_addr[14] = a7 >> 8; \
a.sockaddr.in6.sin6_addr.s6_addr[15] = a7 & 0xFF;
static OFString *const module = @"OFSocket";
@implementation TestsAppDelegate (OFSocketTests)
- (void)socketTests
{
void *pool = objc_autoreleasePoolPush();
OFSocketAddress addr;
TEST(@"Parsing an IPv4",
R(addr = OFSocketAddressParseIP(@"127.0.0.1", 1234)) &&
|