ObjFW  Check-in [cabd461d39]

Overview
Comment:Only test IPv6 if we have support for it.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: cabd461d39ef4def549149acf67980bdfe5675b8d77d2983ec0131e3921fa375
User & Date: js on 2008-12-13 13:42:07
Other Links: manifest | tags
Context
2008-12-13
13:52
On some systems, localhost doesn't work for IPv6, thus use ::1. check-in: add10740d1 user: js tags: trunk
13:42
Only test IPv6 if we have support for it. check-in: cabd461d39 user: js tags: trunk
13:40
Check for IPv6 support. check-in: c1687f2be3 user: js tags: trunk
Changes

Modified tests/OFTCPSocket/OFTCPSocket.m from [af4aa7dc3f] to [115d881410].

64
65
66
67
68
69
70

71
72
73
74
75
76
77
		if (!strcmp(buf, "Hallo!"))
			puts("Received correct string!");
		else {
			puts("Received INCORRECT string!");
			return 1;
		}


		memset(buf, 0, 7);
		
		[accepted free];
		[client close];
		[server close];

		puts("== IPv6 ==");







>







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
		if (!strcmp(buf, "Hallo!"))
			puts("Received correct string!");
		else {
			puts("Received INCORRECT string!");
			return 1;
		}

#ifdef HAVE_IPV6
		memset(buf, 0, 7);
		
		[accepted free];
		[client close];
		[server close];

		puts("== IPv6 ==");
94
95
96
97
98
99
100

101
102
103
104
105
106
107
108
109
110
111

		if (!strcmp(buf, "IPv6:)"))
			puts("Received correct string!");
		else {
			puts("Received INCORRECT string!");
			return 1;
		}


		[accepted free];
		[client close];
		[server close];
	} @catch(OFException *e) {
		printf("EXCEPTION: %s\n", [e cString]);
		return 1;
	}

	return 0;
}







>


|
|







95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

		if (!strcmp(buf, "IPv6:)"))
			puts("Received correct string!");
		else {
			puts("Received INCORRECT string!");
			return 1;
		}
#endif

		[accepted free];
		[client free];
		[server free];
	} @catch(OFException *e) {
		printf("EXCEPTION: %s\n", [e cString]);
		return 1;
	}

	return 0;
}