summaryrefslogtreecommitdiff
path: root/auto_tests/conference_test.c
diff options
context:
space:
mode:
authorDavid Zero <zero@cpp.edu>2016-12-02 04:37:23 -0800
committerDavid Zero <zero@cpp.edu>2017-01-04 13:44:39 -0800
commitf3469070fe899e8e4fd88665386a55bad9f77cd8 (patch)
treec24743d266d3a8593792ef3e8661006cb283368a /auto_tests/conference_test.c
parent535b8238fd191710e1e8864f302fba5a02f52b1d (diff)
Portability fixes
- CFLAG gnu99 was changed to c99. - CXXFLAG c++98 was changed to c++11. - CFLAG -pedantic-errors was added so that non-ISO C now throws errors. - _XOPEN_SOURCE feature test macro added and set to 600 to expose SUSv3 and c99 definitions in modules that required them. - Fixed tests (and bootstrap daemon logging) that were failing due to the altered build flags. - Avoid string suffix misinterpretation; explicit narrowing conversion. - Misc. additions to .gitignore to make sure build artifacts don't wind up in version control.
Diffstat (limited to 'auto_tests/conference_test.c')
-rw-r--r--auto_tests/conference_test.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/auto_tests/conference_test.c b/auto_tests/conference_test.c
index aa2f8e13..36707e0f 100644
--- a/auto_tests/conference_test.c
+++ b/auto_tests/conference_test.c
@@ -1,6 +1,8 @@
1/* Auto Tests: Conferences. 1/* Auto Tests: Conferences.
2 */ 2 */
3 3
4#define _XOPEN_SOURCE 600
5
4#ifdef HAVE_CONFIG_H 6#ifdef HAVE_CONFIG_H
5#include "config.h" 7#include "config.h"
6#endif 8#endif
@@ -175,7 +177,7 @@ group_test_restart:
175 * Either way in this case it's fine */ 177 * Either way in this case it's fine */
176 if (peer_count != NUM_GROUP_TOX) { 178 if (peer_count != NUM_GROUP_TOX) {
177 ++test_run; 179 ++test_run;
178 printf("\tError starting up the first group (peer_count %"PRIu32" != %d, test_run = %d)\n", peer_count, NUM_GROUP_TOX, 180 printf("\tError starting up the first group (peer_count %" PRIu32 " != %d, test_run = %d)\n", peer_count, NUM_GROUP_TOX,
179 test_run); 181 test_run);
180 182
181 for (j = 0; j < NUM_GROUP_TOX; ++j) { 183 for (j = 0; j < NUM_GROUP_TOX; ++j) {
@@ -194,7 +196,7 @@ group_test_restart:
194 * important again. 196 * important again.
195 */ 197 */
196 ck_assert_msg(peer_count == NUM_GROUP_TOX, "\n\tBad number of group peers (pre check)." 198 ck_assert_msg(peer_count == NUM_GROUP_TOX, "\n\tBad number of group peers (pre check)."
197 "\n\t\t\tExpected: %u but tox_instance(%u) only has: %"PRIu32"\n\n", 199 "\n\t\t\tExpected: %u but tox_instance(%u) only has: %" PRIu32 "\n\n",
198 NUM_GROUP_TOX, i, peer_count); 200 NUM_GROUP_TOX, i, peer_count);
199 201
200 uint8_t title[2048]; 202 uint8_t title[2048];
@@ -241,7 +243,7 @@ group_test_restart:
241 for (i = 0; i < (k - 1); ++i) { 243 for (i = 0; i < (k - 1); ++i) {
242 uint32_t peer_count = tox_conference_peer_count(toxes[i], 0, NULL); 244 uint32_t peer_count = tox_conference_peer_count(toxes[i], 0, NULL);
243 ck_assert_msg(peer_count == (k - 1), "\n\tBad number of group peers (post check)." 245 ck_assert_msg(peer_count == (k - 1), "\n\tBad number of group peers (post check)."
244 "\n\t\t\tExpected: %u but tox_instance(%u) only has: %"PRIu32"\n\n", 246 "\n\t\t\tExpected: %u but tox_instance(%u) only has: %" PRIu32 "\n\n",
245 (k - 1), i, peer_count); 247 (k - 1), i, peer_count);
246 } 248 }
247 } 249 }