summaryrefslogtreecommitdiff
path: root/auto_tests
diff options
context:
space:
mode:
authorendoffile78 <endoffile78@yahoo.com>2017-01-05 15:16:56 -0600
committerendoffile78 <endoffile78@yahoo.com>2017-01-05 15:16:56 -0600
commit59e2a844f04a8725e8079f854158aa86ef5988b2 (patch)
tree40130a9f28a5d08b6ff524156f5476b7359f75df /auto_tests
parent0a61d1108547513211560e66809479cab5082ede (diff)
Revert "Portability fixes"
This reverts commit f3469070fe899e8e4fd88665386a55bad9f77cd8.
Diffstat (limited to 'auto_tests')
-rw-r--r--auto_tests/TCP_test.c2
-rw-r--r--auto_tests/conference_test.c8
-rw-r--r--auto_tests/dht_test.c2
-rw-r--r--auto_tests/network_test.c4
-rw-r--r--auto_tests/onion_test.c2
-rw-r--r--auto_tests/save_friend_test.c3
-rw-r--r--auto_tests/tox_many_tcp_test.c2
-rw-r--r--auto_tests/tox_many_test.c2
-rw-r--r--auto_tests/tox_test.c2
-rw-r--r--auto_tests/toxav_basic_test.c2
-rw-r--r--auto_tests/toxav_many_test.c2
11 files changed, 5 insertions, 26 deletions
diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c
index 6a439261..d9013378 100644
--- a/auto_tests/TCP_test.c
+++ b/auto_tests/TCP_test.c
@@ -1,5 +1,3 @@
1#define _XOPEN_SOURCE 600
2
3#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
4#include "config.h" 2#include "config.h"
5#endif 3#endif
diff --git a/auto_tests/conference_test.c b/auto_tests/conference_test.c
index 36707e0f..aa2f8e13 100644
--- a/auto_tests/conference_test.c
+++ b/auto_tests/conference_test.c
@@ -1,8 +1,6 @@
1/* Auto Tests: Conferences. 1/* Auto Tests: Conferences.
2 */ 2 */
3 3
4#define _XOPEN_SOURCE 600
5
6#ifdef HAVE_CONFIG_H 4#ifdef HAVE_CONFIG_H
7#include "config.h" 5#include "config.h"
8#endif 6#endif
@@ -177,7 +175,7 @@ group_test_restart:
177 * Either way in this case it's fine */ 175 * Either way in this case it's fine */
178 if (peer_count != NUM_GROUP_TOX) { 176 if (peer_count != NUM_GROUP_TOX) {
179 ++test_run; 177 ++test_run;
180 printf("\tError starting up the first group (peer_count %" PRIu32 " != %d, test_run = %d)\n", peer_count, NUM_GROUP_TOX, 178 printf("\tError starting up the first group (peer_count %"PRIu32" != %d, test_run = %d)\n", peer_count, NUM_GROUP_TOX,
181 test_run); 179 test_run);
182 180
183 for (j = 0; j < NUM_GROUP_TOX; ++j) { 181 for (j = 0; j < NUM_GROUP_TOX; ++j) {
@@ -196,7 +194,7 @@ group_test_restart:
196 * important again. 194 * important again.
197 */ 195 */
198 ck_assert_msg(peer_count == NUM_GROUP_TOX, "\n\tBad number of group peers (pre check)." 196 ck_assert_msg(peer_count == NUM_GROUP_TOX, "\n\tBad number of group peers (pre check)."
199 "\n\t\t\tExpected: %u but tox_instance(%u) only has: %" PRIu32 "\n\n", 197 "\n\t\t\tExpected: %u but tox_instance(%u) only has: %"PRIu32"\n\n",
200 NUM_GROUP_TOX, i, peer_count); 198 NUM_GROUP_TOX, i, peer_count);
201 199
202 uint8_t title[2048]; 200 uint8_t title[2048];
@@ -243,7 +241,7 @@ group_test_restart:
243 for (i = 0; i < (k - 1); ++i) { 241 for (i = 0; i < (k - 1); ++i) {
244 uint32_t peer_count = tox_conference_peer_count(toxes[i], 0, NULL); 242 uint32_t peer_count = tox_conference_peer_count(toxes[i], 0, NULL);
245 ck_assert_msg(peer_count == (k - 1), "\n\tBad number of group peers (post check)." 243 ck_assert_msg(peer_count == (k - 1), "\n\tBad number of group peers (post check)."
246 "\n\t\t\tExpected: %u but tox_instance(%u) only has: %" PRIu32 "\n\n", 244 "\n\t\t\tExpected: %u but tox_instance(%u) only has: %"PRIu32"\n\n",
247 (k - 1), i, peer_count); 245 (k - 1), i, peer_count);
248 } 246 }
249 } 247 }
diff --git a/auto_tests/dht_test.c b/auto_tests/dht_test.c
index 633e7002..9cec1643 100644
--- a/auto_tests/dht_test.c
+++ b/auto_tests/dht_test.c
@@ -1,5 +1,3 @@
1#define _XOPEN_SOURCE 600
2
3#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
4#include "config.h" 2#include "config.h"
5#endif 3#endif
diff --git a/auto_tests/network_test.c b/auto_tests/network_test.c
index ca918778..783f3f7b 100644
--- a/auto_tests/network_test.c
+++ b/auto_tests/network_test.c
@@ -114,8 +114,8 @@ START_TEST(test_ip_equal)
114 ip2.ip6.uint32[2] = htonl(0xFFFF); 114 ip2.ip6.uint32[2] = htonl(0xFFFF);
115 ip2.ip6.uint32[3] = htonl(0x7F000001); 115 ip2.ip6.uint32[3] = htonl(0x7F000001);
116 116
117 ck_assert_msg(IPV6_IPV4_IN_V6(ip2.ip6) != 0, 117 ck_assert_msg(IN6_IS_ADDR_V4MAPPED(&ip2.ip6.in6_addr) != 0,
118 "IPV6_IPV4_IN_V6(::ffff:127.0.0.1): expected != 0, got 0."); 118 "IN6_IS_ADDR_V4MAPPED(::ffff:127.0.0.1): expected != 0, got 0.");
119 119
120 res = ip_equal(&ip1, &ip2); 120 res = ip_equal(&ip1, &ip2);
121 ck_assert_msg(res != 0, "ip_equal( {AF_INET, 127.0.0.1}, {AF_INET6, ::ffff:127.0.0.1} ): expected result != 0, got 0."); 121 ck_assert_msg(res != 0, "ip_equal( {AF_INET, 127.0.0.1}, {AF_INET6, ::ffff:127.0.0.1} ): expected result != 0, got 0.");
diff --git a/auto_tests/onion_test.c b/auto_tests/onion_test.c
index 05264927..44ea9c7d 100644
--- a/auto_tests/onion_test.c
+++ b/auto_tests/onion_test.c
@@ -1,5 +1,3 @@
1#define _XOPEN_SOURCE 600
2
3#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
4#include "config.h" 2#include "config.h"
5#endif 3#endif
diff --git a/auto_tests/save_friend_test.c b/auto_tests/save_friend_test.c
index 448160c0..9d36ff2d 100644
--- a/auto_tests/save_friend_test.c
+++ b/auto_tests/save_friend_test.c
@@ -1,10 +1,7 @@
1/* Auto Tests: Save and load friends. 1/* Auto Tests: Save and load friends.
2 */ 2 */
3 3
4#define _XOPEN_SOURCE 600
5
6#include "helpers.h" 4#include "helpers.h"
7#include "../toxcore/tox.h"
8 5
9#include <assert.h> 6#include <assert.h>
10#include <stdio.h> 7#include <stdio.h>
diff --git a/auto_tests/tox_many_tcp_test.c b/auto_tests/tox_many_tcp_test.c
index 48f5671c..197c6e47 100644
--- a/auto_tests/tox_many_tcp_test.c
+++ b/auto_tests/tox_many_tcp_test.c
@@ -1,8 +1,6 @@
1/* Auto Tests: Many TCP. 1/* Auto Tests: Many TCP.
2 */ 2 */
3 3
4#define _XOPEN_SOURCE 600
5
6#ifdef HAVE_CONFIG_H 4#ifdef HAVE_CONFIG_H
7#include "config.h" 5#include "config.h"
8#endif 6#endif
diff --git a/auto_tests/tox_many_test.c b/auto_tests/tox_many_test.c
index b44bbb0c..0c4c8c7d 100644
--- a/auto_tests/tox_many_test.c
+++ b/auto_tests/tox_many_test.c
@@ -1,8 +1,6 @@
1/* Auto Tests: Many clients. 1/* Auto Tests: Many clients.
2 */ 2 */
3 3
4#define _XOPEN_SOURCE 600
5
6#ifdef HAVE_CONFIG_H 4#ifdef HAVE_CONFIG_H
7#include "config.h" 5#include "config.h"
8#endif 6#endif
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c
index ab2202d1..dfd1d80a 100644
--- a/auto_tests/tox_test.c
+++ b/auto_tests/tox_test.c
@@ -10,8 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#define _XOPEN_SOURCE 600
14
15#ifdef HAVE_CONFIG_H 13#ifdef HAVE_CONFIG_H
16#include "config.h" 14#include "config.h"
17#endif 15#endif
diff --git a/auto_tests/toxav_basic_test.c b/auto_tests/toxav_basic_test.c
index 79f552de..767fca87 100644
--- a/auto_tests/toxav_basic_test.c
+++ b/auto_tests/toxav_basic_test.c
@@ -1,5 +1,3 @@
1#define _XOPEN_SOURCE 600
2
3#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
4#include "config.h" 2#include "config.h"
5#endif 3#endif
diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c
index 1a10db44..b33b93c8 100644
--- a/auto_tests/toxav_many_test.c
+++ b/auto_tests/toxav_many_test.c
@@ -1,5 +1,3 @@
1#define _XOPEN_SOURCE 600
2
3#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
4#include "config.h" 2#include "config.h"
5#endif 3#endif