ObjFW  Check-in [578a0778b5]

Overview
Comment:OFSPX*SocketTests: Do not compare remote's network

It can be different due to IPX internal networks.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 578a0778b5d2a5fc4eaa02df7f66f45f75bbd4bcd383f468d9a8faadceb00cca
User & Date: js on 2023-01-13 01:35:55
Other Links: manifest | tags
Context
2023-01-13
13:00
OFString: Remove OF_RETURNS_INNER_POINTER check-in: c8e1b0c2b9 user: js tags: trunk
01:35
OFSPX*SocketTests: Do not compare remote's network check-in: 578a0778b5 user: js tags: trunk
01:28
OFDNSResolverSettings: Reject empty NS on Windows check-in: c4f99bd429 user: js tags: trunk
Changes

Modified tests/OFSPXSocketTests.m from [f98eea3f74] to [34fd2a42ae].

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

	TEST(@"-[receiveIntoBuffer:length:]",
	    [sockClient receiveIntoBuffer: buffer length: 5] == 5 &&
	    memcmp(buffer, "Hello", 5) == 0)

	TEST(@"-[remoteAddress]",
	    (address2 = sockAccepted.remoteAddress) &&
	    OFSocketAddressIPXNetwork(address2) == network &&
	    R(OFSocketAddressGetIPXNode(address2, node2)) &&
	    memcmp(node, node2, IPX_NODE_LEN) == 0)

	delegate = [[[SPXSocketDelegate alloc] init] autorelease];

	sockServer = [OFSPXSocket socket];
	delegate->_expectedServerSocket = sockServer;







<







134
135
136
137
138
139
140

141
142
143
144
145
146
147

	TEST(@"-[receiveIntoBuffer:length:]",
	    [sockClient receiveIntoBuffer: buffer length: 5] == 5 &&
	    memcmp(buffer, "Hello", 5) == 0)

	TEST(@"-[remoteAddress]",
	    (address2 = sockAccepted.remoteAddress) &&

	    R(OFSocketAddressGetIPXNode(address2, node2)) &&
	    memcmp(node, node2, IPX_NODE_LEN) == 0)

	delegate = [[[SPXSocketDelegate alloc] init] autorelease];

	sockServer = [OFSPXSocket socket];
	delegate->_expectedServerSocket = sockServer;

Modified tests/OFSPXStreamSocketTests.m from [0454131d78] to [d3fe81ec6a].

138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
	    [sockClient readIntoBuffer: buffer length: 2] == 2 &&
	    memcmp(buffer, "He", 2) == 0 &&
	    [sockClient readIntoBuffer: buffer length: 3] == 3 &&
	    memcmp(buffer, "llo", 3) == 0)

	TEST(@"-[remoteAddress]",
	    (address2 = sockAccepted.remoteAddress) &&
	    OFSocketAddressIPXNetwork(address2) == network &&
	    R(OFSocketAddressGetIPXNode(address2, node2)) &&
	    memcmp(node, node2, IPX_NODE_LEN) == 0)

	delegate = [[[SPXStreamSocketDelegate alloc] init] autorelease];

	sockServer = [OFSPXStreamSocket socket];
	delegate->_expectedServerSocket = sockServer;







<







138
139
140
141
142
143
144

145
146
147
148
149
150
151
	    [sockClient readIntoBuffer: buffer length: 2] == 2 &&
	    memcmp(buffer, "He", 2) == 0 &&
	    [sockClient readIntoBuffer: buffer length: 3] == 3 &&
	    memcmp(buffer, "llo", 3) == 0)

	TEST(@"-[remoteAddress]",
	    (address2 = sockAccepted.remoteAddress) &&

	    R(OFSocketAddressGetIPXNode(address2, node2)) &&
	    memcmp(node, node2, IPX_NODE_LEN) == 0)

	delegate = [[[SPXStreamSocketDelegate alloc] init] autorelease];

	sockServer = [OFSPXStreamSocket socket];
	delegate->_expectedServerSocket = sockServer;