summaryrefslogtreecommitdiff
path: root/src/tests/ecore_con
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-03-15 12:50:20 -0400
committerCedric Bail <cedric@osg.samsung.com>2018-03-20 17:20:56 -0700
commit4c4177ac207f982de8139c47c7afedd26ff9e15a (patch)
tree1913e890dc525621f4dec3ce281b340d81608a72 /src/tests/ecore_con
parenta1bf513920e813037756e01cc2e01770befea77c (diff)
efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Diffstat (limited to 'src/tests/ecore_con')
-rw-r--r--src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
index 563af26..dc9b7e8 100644
--- a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
+++ b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
@@ -307,29 +307,29 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_manual_ok)
307 307
308 addr.sin_port = htons(12345); 308 addr.sin_port = htons(12345);
309 addr.sin_addr.s_addr = htonl(0xabcdefafU); 309 addr.sin_addr.s_addr = htonl(0xabcdefafU);
310 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 310 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
311 efl_net_ip_address_family_set(efl_added, AF_INET), 311 efl_net_ip_address_family_set(efl_added, AF_INET),
312 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)), 312 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)),
313 efl_net_ip_address_set(efl_added, slice)); 313 efl_net_ip_address_set(efl_added, slice));
314 _ipv4_check(o, &addr); 314 _ipv4_check(o, &addr);
315 efl_del(o); 315 efl_unref(o);
316 316
317 addr.sin_port = htons(8081); 317 addr.sin_port = htons(8081);
318 addr.sin_addr.s_addr = htonl(0); 318 addr.sin_addr.s_addr = htonl(0);
319 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 319 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
320 efl_net_ip_address_family_set(efl_added, AF_INET), 320 efl_net_ip_address_family_set(efl_added, AF_INET),
321 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)), 321 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)),
322 efl_net_ip_address_set(efl_added, slice)); 322 efl_net_ip_address_set(efl_added, slice));
323 _ipv4_check(o, &addr); 323 _ipv4_check(o, &addr);
324 efl_del(o); 324 efl_unref(o);
325 325
326 addr.sin_port = htons(0); 326 addr.sin_port = htons(0);
327 addr.sin_addr.s_addr = htonl(0x12345678); 327 addr.sin_addr.s_addr = htonl(0x12345678);
328 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 328 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
329 efl_net_ip_address_family_set(efl_added, AF_INET), 329 efl_net_ip_address_family_set(efl_added, AF_INET),
330 efl_net_ip_address_set(efl_added, slice)); 330 efl_net_ip_address_set(efl_added, slice));
331 _ipv4_check(o, &addr); 331 _ipv4_check(o, &addr);
332 efl_del(o); 332 efl_unref(o);
333 333
334 ecore_con_shutdown(); 334 ecore_con_shutdown();
335} 335}
@@ -348,46 +348,46 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_manual_fail)
348 ecore_con_init(); 348 ecore_con_init();
349 349
350 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 350 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
351 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL); 351 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL);
352 ck_assert_ptr_eq(o, NULL); 352 ck_assert_ptr_eq(o, NULL);
353 TRAP_ERRORS_FINISH(1); 353 TRAP_ERRORS_FINISH(1);
354 354
355 TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); 355 TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL);
356 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 356 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
357 efl_net_ip_address_family_set(efl_added, 12345)); 357 efl_net_ip_address_family_set(efl_added, 12345));
358 ck_assert_ptr_eq(o, NULL); 358 ck_assert_ptr_eq(o, NULL);
359 TRAP_ERRORS_FINISH(2); 359 TRAP_ERRORS_FINISH(2);
360 360
361 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 361 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
362 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 362 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
363 efl_net_ip_address_set(efl_added, wrong_slice)); 363 efl_net_ip_address_set(efl_added, wrong_slice));
364 ck_assert_ptr_eq(o, NULL); 364 ck_assert_ptr_eq(o, NULL);
365 TRAP_ERRORS_FINISH(2); 365 TRAP_ERRORS_FINISH(2);
366 366
367 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 367 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
368 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 368 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
369 efl_net_ip_address_port_set(efl_added, 1234)); 369 efl_net_ip_address_port_set(efl_added, 1234));
370 ck_assert_ptr_eq(o, NULL); 370 ck_assert_ptr_eq(o, NULL);
371 TRAP_ERRORS_FINISH(2); 371 TRAP_ERRORS_FINISH(2);
372 372
373 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 373 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
374 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 374 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
375 efl_net_ip_address_port_set(efl_added, 1234), 375 efl_net_ip_address_port_set(efl_added, 1234),
376 efl_net_ip_address_set(efl_added, wrong_slice)); 376 efl_net_ip_address_set(efl_added, wrong_slice));
377 ck_assert_ptr_eq(o, NULL); 377 ck_assert_ptr_eq(o, NULL);
378 TRAP_ERRORS_FINISH(3); 378 TRAP_ERRORS_FINISH(3);
379 379
380 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true"); 380 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true");
381 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 381 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
382 efl_net_ip_address_family_set(efl_added, AF_INET), 382 efl_net_ip_address_family_set(efl_added, AF_INET),
383 efl_net_ip_address_set(efl_added, wrong_slice)); 383 efl_net_ip_address_set(efl_added, wrong_slice));
384 _ipv4_check(o, &addr); 384 _ipv4_check(o, &addr);
385 efl_del(o); 385 efl_unref(o);
386 TRAP_ERRORS_FINISH(1); 386 TRAP_ERRORS_FINISH(1);
387 387
388 addr.sin_port = htons(12345); 388 addr.sin_port = htons(12345);
389 addr.sin_addr.s_addr = htonl(0xabcdefafU); 389 addr.sin_addr.s_addr = htonl(0xabcdefafU);
390 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 390 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
391 efl_net_ip_address_family_set(efl_added, AF_INET), 391 efl_net_ip_address_family_set(efl_added, AF_INET),
392 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)), 392 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)),
393 efl_net_ip_address_set(efl_added, slice)); 393 efl_net_ip_address_set(efl_added, slice));
@@ -417,7 +417,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_manual_fail)
417 efl_net_ip_address_set(o, slice); 417 efl_net_ip_address_set(o, slice);
418 TRAP_ERRORS_FINISH(1); 418 TRAP_ERRORS_FINISH(1);
419 419
420 efl_del(o); 420 efl_unref(o);
421 421
422 ecore_con_shutdown(); 422 ecore_con_shutdown();
423} 423}
@@ -439,7 +439,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok)
439 ntohs(addr.sin_port), 439 ntohs(addr.sin_port),
440 slice); 440 slice);
441 _ipv4_check(o, &addr); 441 _ipv4_check(o, &addr);
442 efl_del(o); 442 efl_unref(o);
443 443
444 addr.sin_port = htons(8081); 444 addr.sin_port = htons(8081);
445 addr.sin_addr.s_addr = htonl(0); 445 addr.sin_addr.s_addr = htonl(0);
@@ -447,7 +447,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok)
447 ntohs(addr.sin_port), 447 ntohs(addr.sin_port),
448 slice); 448 slice);
449 _ipv4_check(o, &addr); 449 _ipv4_check(o, &addr);
450 efl_del(o); 450 efl_unref(o);
451 451
452 addr.sin_port = htons(0); 452 addr.sin_port = htons(0);
453 addr.sin_addr.s_addr = htonl(0x12345678); 453 addr.sin_addr.s_addr = htonl(0x12345678);
@@ -455,7 +455,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok)
455 ntohs(addr.sin_port), 455 ntohs(addr.sin_port),
456 slice); 456 slice);
457 _ipv4_check(o, &addr); 457 _ipv4_check(o, &addr);
458 efl_del(o); 458 efl_unref(o);
459 459
460 ecore_con_shutdown(); 460 ecore_con_shutdown();
461} 461}
@@ -494,14 +494,14 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_sockaddr_ok)
494 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 494 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
495 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 495 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
496 _ipv4_check(o, &addr); 496 _ipv4_check(o, &addr);
497 efl_del(o); 497 efl_unref(o);
498 498
499 addr.sin_port = htons(0); 499 addr.sin_port = htons(0);
500 addr.sin_addr.s_addr = htonl(0); 500 addr.sin_addr.s_addr = htonl(0);
501 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 501 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
502 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 502 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
503 _ipv4_check(o, &addr); 503 _ipv4_check(o, &addr);
504 efl_del(o); 504 efl_unref(o);
505 505
506 ecore_con_shutdown(); 506 ecore_con_shutdown();
507} 507}
@@ -539,22 +539,22 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_parse_ok)
539 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:12345"); 539 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:12345");
540 ck_assert_ptr_ne(o, NULL); 540 ck_assert_ptr_ne(o, NULL);
541 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1:12345"); 541 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1:12345");
542 efl_del(o); 542 efl_unref(o);
543 543
544 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:0"); 544 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:0");
545 ck_assert_ptr_ne(o, NULL); 545 ck_assert_ptr_ne(o, NULL);
546 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1"); 546 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1");
547 efl_del(o); 547 efl_unref(o);
548 548
549 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1"); 549 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1");
550 ck_assert_ptr_ne(o, NULL); 550 ck_assert_ptr_ne(o, NULL);
551 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1"); 551 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1");
552 efl_del(o); 552 efl_unref(o);
553 553
554 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "192.168.0.123:80"); 554 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "192.168.0.123:80");
555 ck_assert_ptr_ne(o, NULL); 555 ck_assert_ptr_ne(o, NULL);
556 ck_assert_str_eq(efl_net_ip_address_string_get(o), "192.168.0.123:80"); 556 ck_assert_str_eq(efl_net_ip_address_string_get(o), "192.168.0.123:80");
557 efl_del(o); 557 efl_unref(o);
558 558
559 ecore_con_shutdown(); 559 ecore_con_shutdown();
560} 560}
@@ -716,7 +716,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_checks)
716 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), EINA_FALSE); 716 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), EINA_FALSE);
717 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), EINA_FALSE); 717 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), EINA_FALSE);
718 718
719 efl_del(o); 719 efl_unref(o);
720 } 720 }
721 721
722 ecore_con_shutdown(); 722 ecore_con_shutdown();
@@ -773,21 +773,21 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_manual_ok)
773 773
774 addr.sin6_port = htons(12345); 774 addr.sin6_port = htons(12345);
775 _ipv6_set(&addr, 1, 2, 3, 4, 5, 6, 7, 8); 775 _ipv6_set(&addr, 1, 2, 3, 4, 5, 6, 7, 8);
776 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 776 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
777 efl_net_ip_address_family_set(efl_added, AF_INET6), 777 efl_net_ip_address_family_set(efl_added, AF_INET6),
778 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)), 778 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)),
779 efl_net_ip_address_set(efl_added, slice)); 779 efl_net_ip_address_set(efl_added, slice));
780 _ipv6_check(o, &addr); 780 _ipv6_check(o, &addr);
781 efl_del(o); 781 efl_unref(o);
782 782
783 addr.sin6_port = htons(8081); 783 addr.sin6_port = htons(8081);
784 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); 784 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0);
785 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 785 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
786 efl_net_ip_address_family_set(efl_added, AF_INET6), 786 efl_net_ip_address_family_set(efl_added, AF_INET6),
787 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)), 787 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)),
788 efl_net_ip_address_set(efl_added, slice)); 788 efl_net_ip_address_set(efl_added, slice));
789 _ipv6_check(o, &addr); 789 _ipv6_check(o, &addr);
790 efl_del(o); 790 efl_unref(o);
791 791
792 ecore_con_shutdown(); 792 ecore_con_shutdown();
793} 793}
@@ -808,16 +808,16 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_manual_fail)
808 /* generic errors checked at ecore_test_efl_net_ip_address_ipv4_manual_fail */ 808 /* generic errors checked at ecore_test_efl_net_ip_address_ipv4_manual_fail */
809 809
810 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true"); 810 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true");
811 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 811 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
812 efl_net_ip_address_family_set(efl_added, AF_INET6), 812 efl_net_ip_address_family_set(efl_added, AF_INET6),
813 efl_net_ip_address_set(efl_added, wrong_slice)); 813 efl_net_ip_address_set(efl_added, wrong_slice));
814 _ipv6_check(o, &addr); 814 _ipv6_check(o, &addr);
815 efl_del(o); 815 efl_unref(o);
816 TRAP_ERRORS_FINISH(1); 816 TRAP_ERRORS_FINISH(1);
817 817
818 addr.sin6_port = htons(12345); 818 addr.sin6_port = htons(12345);
819 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1); 819 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1);
820 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 820 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
821 efl_net_ip_address_family_set(efl_added, AF_INET6), 821 efl_net_ip_address_family_set(efl_added, AF_INET6),
822 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)), 822 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)),
823 efl_net_ip_address_set(efl_added, slice)); 823 efl_net_ip_address_set(efl_added, slice));
@@ -847,7 +847,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_manual_fail)
847 efl_net_ip_address_set(o, slice); 847 efl_net_ip_address_set(o, slice);
848 TRAP_ERRORS_FINISH(1); 848 TRAP_ERRORS_FINISH(1);
849 849
850 efl_del(o); 850 efl_unref(o);
851 851
852 ecore_con_shutdown(); 852 ecore_con_shutdown();
853} 853}
@@ -869,7 +869,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok)
869 ntohs(addr.sin6_port), 869 ntohs(addr.sin6_port),
870 slice); 870 slice);
871 _ipv6_check(o, &addr); 871 _ipv6_check(o, &addr);
872 efl_del(o); 872 efl_unref(o);
873 873
874 addr.sin6_port = htons(8081); 874 addr.sin6_port = htons(8081);
875 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); 875 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0);
@@ -877,7 +877,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok)
877 ntohs(addr.sin6_port), 877 ntohs(addr.sin6_port),
878 slice); 878 slice);
879 _ipv6_check(o, &addr); 879 _ipv6_check(o, &addr);
880 efl_del(o); 880 efl_unref(o);
881 881
882 addr.sin6_port = htons(0); 882 addr.sin6_port = htons(0);
883 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1); 883 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1);
@@ -885,7 +885,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok)
885 ntohs(addr.sin6_port), 885 ntohs(addr.sin6_port),
886 slice); 886 slice);
887 _ipv6_check(o, &addr); 887 _ipv6_check(o, &addr);
888 efl_del(o); 888 efl_unref(o);
889 889
890 ecore_con_shutdown(); 890 ecore_con_shutdown();
891} 891}
@@ -905,14 +905,14 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_sockaddr_ok)
905 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 905 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
906 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 906 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
907 _ipv6_check(o, &addr); 907 _ipv6_check(o, &addr);
908 efl_del(o); 908 efl_unref(o);
909 909
910 addr.sin6_port = htons(0); 910 addr.sin6_port = htons(0);
911 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); 911 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0);
912 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 912 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
913 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 913 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
914 _ipv6_check(o, &addr); 914 _ipv6_check(o, &addr);
915 efl_del(o); 915 efl_unref(o);
916 916
917 ecore_con_shutdown(); 917 ecore_con_shutdown();
918} 918}
@@ -927,86 +927,86 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_parse_ok)
927 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:12345"); 927 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:12345");
928 ck_assert_ptr_ne(o, NULL); 928 ck_assert_ptr_ne(o, NULL);
929 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]:12345"); 929 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]:12345");
930 efl_del(o); 930 efl_unref(o);
931 931
932 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:0"); 932 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:0");
933 ck_assert_ptr_ne(o, NULL); 933 ck_assert_ptr_ne(o, NULL);
934 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); 934 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]");
935 efl_del(o); 935 efl_unref(o);
936 936
937 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]"); 937 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]");
938 ck_assert_ptr_ne(o, NULL); 938 ck_assert_ptr_ne(o, NULL);
939 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); 939 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]");
940 efl_del(o); 940 efl_unref(o);
941 941
942 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::1"); 942 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::1");
943 ck_assert_ptr_ne(o, NULL); 943 ck_assert_ptr_ne(o, NULL);
944 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); 944 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]");
945 efl_del(o); 945 efl_unref(o);
946 946
947 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:12345"); 947 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:12345");
948 ck_assert_ptr_ne(o, NULL); 948 ck_assert_ptr_ne(o, NULL);
949 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]:12345"); 949 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]:12345");
950 efl_del(o); 950 efl_unref(o);
951 951
952 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:0"); 952 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:0");
953 ck_assert_ptr_ne(o, NULL); 953 ck_assert_ptr_ne(o, NULL);
954 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); 954 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]");
955 efl_del(o); 955 efl_unref(o);
956 956
957 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]"); 957 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]");
958 ck_assert_ptr_ne(o, NULL); 958 ck_assert_ptr_ne(o, NULL);
959 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); 959 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]");
960 efl_del(o); 960 efl_unref(o);
961 961
962 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::"); 962 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::");
963 ck_assert_ptr_ne(o, NULL); 963 ck_assert_ptr_ne(o, NULL);
964 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); 964 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]");
965 efl_del(o); 965 efl_unref(o);
966 966
967 /* IPv4 Mapped */ 967 /* IPv4 Mapped */
968 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]:12345"); 968 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]:12345");
969 ck_assert_ptr_ne(o, NULL); 969 ck_assert_ptr_ne(o, NULL);
970 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]:12345"); 970 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]:12345");
971 efl_del(o); 971 efl_unref(o);
972 972
973 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]"); 973 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]");
974 ck_assert_ptr_ne(o, NULL); 974 ck_assert_ptr_ne(o, NULL);
975 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]"); 975 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]");
976 efl_del(o); 976 efl_unref(o);
977 977
978 /* IPv4 Compatible */ 978 /* IPv4 Compatible */
979 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]:12345"); 979 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]:12345");
980 ck_assert_ptr_ne(o, NULL); 980 ck_assert_ptr_ne(o, NULL);
981 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]:12345"); 981 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]:12345");
982 efl_del(o); 982 efl_unref(o);
983 983
984 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]"); 984 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]");
985 ck_assert_ptr_ne(o, NULL); 985 ck_assert_ptr_ne(o, NULL);
986 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]"); 986 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]");
987 efl_del(o); 987 efl_unref(o);
988 988
989 /* Link Local */ 989 /* Link Local */
990 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]:12345"); 990 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]:12345");
991 ck_assert_ptr_ne(o, NULL); 991 ck_assert_ptr_ne(o, NULL);
992 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]:12345"); 992 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]:12345");
993 efl_del(o); 993 efl_unref(o);
994 994
995 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]"); 995 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]");
996 ck_assert_ptr_ne(o, NULL); 996 ck_assert_ptr_ne(o, NULL);
997 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]"); 997 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]");
998 efl_del(o); 998 efl_unref(o);
999 999
1000 /* Site Local */ 1000 /* Site Local */
1001 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]:12345"); 1001 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]:12345");
1002 ck_assert_ptr_ne(o, NULL); 1002 ck_assert_ptr_ne(o, NULL);
1003 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]:12345"); 1003 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]:12345");
1004 efl_del(o); 1004 efl_unref(o);
1005 1005
1006 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]"); 1006 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]");
1007 ck_assert_ptr_ne(o, NULL); 1007 ck_assert_ptr_ne(o, NULL);
1008 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]"); 1008 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]");
1009 efl_del(o); 1009 efl_unref(o);
1010 1010
1011 ecore_con_shutdown(); 1011 ecore_con_shutdown();
1012} 1012}
@@ -1253,7 +1253,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_checks)
1253 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), IN6_IS_ADDR_LINKLOCAL(ia)); 1253 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), IN6_IS_ADDR_LINKLOCAL(ia));
1254 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), IN6_IS_ADDR_SITELOCAL(ia)); 1254 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), IN6_IS_ADDR_SITELOCAL(ia));
1255 1255
1256 efl_del(o); 1256 efl_unref(o);
1257 } 1257 }
1258 1258
1259 ecore_con_shutdown(); 1259 ecore_con_shutdown();