aboutsummaryrefslogtreecommitdiff
path: root/tests/test_gnunet_chat_handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_gnunet_chat_handle.c')
-rw-r--r--tests/test_gnunet_chat_handle.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/test_gnunet_chat_handle.c b/tests/test_gnunet_chat_handle.c
index 6bc6fbf..c8a9e89 100644
--- a/tests/test_gnunet_chat_handle.c
+++ b/tests/test_gnunet_chat_handle.c
@@ -255,7 +255,7 @@ skip_search_account:
255 else 255 else
256 { 256 {
257 ck_assert_ptr_ne(dup, NULL); 257 ck_assert_ptr_ne(dup, NULL);
258 // ck_assert_str_ne(key, dup); // TODO: needs to be implemented in service! 258 ck_assert_str_ne(key, dup);
259 259
260 GNUNET_free(dup); 260 GNUNET_free(dup);
261 261
@@ -303,7 +303,7 @@ on_gnunet_chat_handle_rename_it(void *cls,
303 ck_assert_ptr_ne(name, NULL); 303 ck_assert_ptr_ne(name, NULL);
304 ck_assert_ptr_eq(GNUNET_CHAT_get_connected(handle), NULL); 304 ck_assert_ptr_eq(GNUNET_CHAT_get_connected(handle), NULL);
305 305
306 if (0 == strcmp(name, "gnunet_chat_handle_rename_A")) 306 if (0 == strcmp(name, "gnunet_chat_handle_rename_a"))
307 { 307 {
308 GNUNET_CHAT_connect(chat, account); 308 GNUNET_CHAT_connect(chat, account);
309 return GNUNET_NO; 309 return GNUNET_NO;
@@ -346,6 +346,8 @@ skip_search_account:
346 const char *name = GNUNET_CHAT_get_name(handle); 346 const char *name = GNUNET_CHAT_get_name(handle);
347 ck_assert_ptr_ne(name, NULL); 347 ck_assert_ptr_ne(name, NULL);
348 348
349 printf("login: %s\n", name);
350
349 char *dup = (char*) GNUNET_CHAT_get_user_pointer(handle); 351 char *dup = (char*) GNUNET_CHAT_get_user_pointer(handle);
350 352
351 if (!dup) 353 if (!dup)
@@ -359,10 +361,10 @@ skip_search_account:
359 361
360 ck_assert_int_eq(GNUNET_CHAT_set_name( 362 ck_assert_int_eq(GNUNET_CHAT_set_name(
361 handle, 363 handle,
362 "gnunet_chat_handle_rename_B" 364 "gnunet_chat_handle_rename_b"
363 ), GNUNET_YES); 365 ), GNUNET_YES);
364 } 366 }
365 else 367 else if (0 != strcmp(name, dup))
366 { 368 {
367 ck_assert_ptr_ne(dup, NULL); 369 ck_assert_ptr_ne(dup, NULL);
368 ck_assert_str_ne(name, dup); 370 ck_assert_str_ne(name, dup);
@@ -373,7 +375,7 @@ skip_search_account:
373 375
374 ck_assert_int_eq(GNUNET_CHAT_account_delete( 376 ck_assert_int_eq(GNUNET_CHAT_account_delete(
375 handle, 377 handle,
376 "gnunet_chat_handle_rename_B" 378 "gnunet_chat_handle_rename_b"
377 ), GNUNET_OK); 379 ), GNUNET_OK);
378 380
379 GNUNET_CHAT_stop(handle); 381 GNUNET_CHAT_stop(handle);
@@ -391,7 +393,7 @@ call_gnunet_chat_handle_rename(const struct GNUNET_CONFIGURATION_Handle *cfg)
391 ck_assert_ptr_ne(handle, NULL); 393 ck_assert_ptr_ne(handle, NULL);
392 ck_assert_int_eq(GNUNET_CHAT_account_create( 394 ck_assert_int_eq(GNUNET_CHAT_account_create(
393 handle, 395 handle,
394 "gnunet_chat_handle_rename_A" 396 "gnunet_chat_handle_rename_a"
395 ), GNUNET_OK); 397 ), GNUNET_OK);
396} 398}
397 399