summaryrefslogtreecommitdiff
path: root/src/tests/eina/eina_test_value.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-03-27 13:51:13 -0400
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-05 11:10:26 +0200
commit624925fe6e9c72c639d47135d5ea70d4110ac1fe (patch)
treeb57c12a611bf3b4b492327a7fcb5722cd39dad5b /src/tests/eina/eina_test_value.c
parent730020c7d4a87daf60cbfbb3a0a912b4f75d8cb5 (diff)
tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions in most cases, and many did not properly do this anyway see followup commit which resolves some issues with eina tests ref T6813 ref T6811 Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Diffstat (limited to 'src/tests/eina/eina_test_value.c')
-rw-r--r--src/tests/eina/eina_test_value.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/tests/eina/eina_test_value.c b/src/tests/eina/eina_test_value.c
index 76b9a0b4c1..caa47b7cee 100644
--- a/src/tests/eina/eina_test_value.c
+++ b/src/tests/eina/eina_test_value.c
@@ -47,7 +47,6 @@ EFL_START_TEST(eina_value_test_simple)
47 float f; 47 float f;
48 double d; 48 double d;
49 49
50 eina_init();
51 50
52 value = eina_value_new(EINA_VALUE_TYPE_CHAR); 51 value = eina_value_new(EINA_VALUE_TYPE_CHAR);
53 fail_unless(value != NULL); 52 fail_unless(value != NULL);
@@ -126,7 +125,6 @@ EFL_START_TEST(eina_value_test_simple)
126 eina_value_flush(value); 125 eina_value_flush(value);
127 126
128 eina_value_free(value); 127 eina_value_free(value);
129 eina_shutdown();
130} 128}
131EFL_END_TEST 129EFL_END_TEST
132 130
@@ -134,7 +132,6 @@ EFL_START_TEST(eina_value_test_compare)
134{ 132{
135 Eina_Value *a, *b; 133 Eina_Value *a, *b;
136 134
137 eina_init();
138 135
139 a = eina_value_new(EINA_VALUE_TYPE_CHAR); 136 a = eina_value_new(EINA_VALUE_TYPE_CHAR);
140 fail_unless(a != NULL); 137 fail_unless(a != NULL);
@@ -430,7 +427,6 @@ EFL_START_TEST(eina_value_test_compare)
430 427
431 eina_value_free(a); 428 eina_value_free(a);
432 eina_value_free(b); 429 eina_value_free(b);
433 eina_shutdown();
434} 430}
435EFL_END_TEST 431EFL_END_TEST
436 432
@@ -439,7 +435,6 @@ EFL_START_TEST(eina_value_test_string)
439 Eina_Value *value; 435 Eina_Value *value;
440 const char *s; 436 const char *s;
441 437
442 eina_init();
443 438
444 value = eina_value_new(EINA_VALUE_TYPE_STRING); 439 value = eina_value_new(EINA_VALUE_TYPE_STRING);
445 fail_unless(value != NULL); 440 fail_unless(value != NULL);
@@ -459,7 +454,6 @@ EFL_START_TEST(eina_value_test_string)
459 ck_assert_str_eq(s, "profusion"); 454 ck_assert_str_eq(s, "profusion");
460 455
461 eina_value_free(value); 456 eina_value_free(value);
462 eina_shutdown();
463} 457}
464EFL_END_TEST 458EFL_END_TEST
465 459
@@ -480,7 +474,6 @@ EFL_START_TEST(eina_value_test_pvariant)
480 double d, in_d; 474 double d, in_d;
481 const char *str, *in_str; 475 const char *str, *in_str;
482 476
483 eina_init();
484 477
485 value = eina_value_new(EINA_VALUE_TYPE_CHAR); 478 value = eina_value_new(EINA_VALUE_TYPE_CHAR);
486 fail_unless(value != NULL); 479 fail_unless(value != NULL);
@@ -590,7 +583,6 @@ EFL_START_TEST(eina_value_test_pvariant)
590 ck_assert_str_eq(str, "profusion"); 583 ck_assert_str_eq(str, "profusion");
591 584
592 eina_value_free(value); 585 eina_value_free(value);
593 eina_shutdown();
594} 586}
595EFL_END_TEST 587EFL_END_TEST
596 588
@@ -613,7 +605,6 @@ EFL_START_TEST(eina_value_test_to_string)
613 char *out; 605 char *out;
614 char buf[256]; 606 char buf[256];
615 607
616 eina_init();
617 608
618 value = eina_value_new(EINA_VALUE_TYPE_CHAR); 609 value = eina_value_new(EINA_VALUE_TYPE_CHAR);
619 fail_unless(value != NULL); 610 fail_unless(value != NULL);
@@ -795,7 +786,6 @@ EFL_START_TEST(eina_value_test_to_string)
795 free(out); 786 free(out);
796 787
797 eina_value_free(value); 788 eina_value_free(value);
798 eina_shutdown();
799} 789}
800EFL_END_TEST 790EFL_END_TEST
801 791
@@ -808,7 +798,6 @@ EFL_START_TEST(eina_value_test_to_binbuf)
808 const char *out; 798 const char *out;
809 char buf[256]; 799 char buf[256];
810 800
811 eina_init();
812 801
813 value = eina_value_new(EINA_VALUE_TYPE_CHAR); 802 value = eina_value_new(EINA_VALUE_TYPE_CHAR);
814 fail_unless(value != NULL); 803 fail_unless(value != NULL);
@@ -859,7 +848,6 @@ EFL_START_TEST(eina_value_test_to_binbuf)
859 eina_binbuf_free(bin); 848 eina_binbuf_free(bin);
860 849
861 eina_value_free(value); 850 eina_value_free(value);
862 eina_shutdown();
863} 851}
864EFL_END_TEST 852EFL_END_TEST
865 853
@@ -880,7 +868,6 @@ EFL_START_TEST(eina_value_test_convert_char)
880 double d; 868 double d;
881 const char *str; 869 const char *str;
882 870
883 eina_init();
884 871
885 value = eina_value_new(EINA_VALUE_TYPE_CHAR); 872 value = eina_value_new(EINA_VALUE_TYPE_CHAR);
886 fail_unless(value != NULL); 873 fail_unless(value != NULL);
@@ -990,7 +977,6 @@ EFL_START_TEST(eina_value_test_convert_char)
990 eina_value_flush(&conv); 977 eina_value_flush(&conv);
991 978
992 eina_value_free(value); 979 eina_value_free(value);
993 eina_shutdown();
994} 980}
995EFL_END_TEST 981EFL_END_TEST
996 982
@@ -1011,7 +997,6 @@ EFL_START_TEST(eina_value_test_convert_uchar)
1011 double d; 997 double d;
1012 const char *str; 998 const char *str;
1013 999
1014 eina_init();
1015 1000
1016 value = eina_value_new(EINA_VALUE_TYPE_UCHAR); 1001 value = eina_value_new(EINA_VALUE_TYPE_UCHAR);
1017 fail_unless(value != NULL); 1002 fail_unless(value != NULL);
@@ -1105,7 +1090,6 @@ EFL_START_TEST(eina_value_test_convert_uchar)
1105 eina_value_flush(&conv); 1090 eina_value_flush(&conv);
1106 1091
1107 eina_value_free(value); 1092 eina_value_free(value);
1108 eina_shutdown();
1109} 1093}
1110EFL_END_TEST 1094EFL_END_TEST
1111 1095
@@ -1124,7 +1108,6 @@ EFL_START_TEST(eina_value_test_convert_short)
1124 double d; 1108 double d;
1125 const char *str; 1109 const char *str;
1126 1110
1127 eina_init();
1128 1111
1129 value = eina_value_new(EINA_VALUE_TYPE_SHORT); 1112 value = eina_value_new(EINA_VALUE_TYPE_SHORT);
1130 fail_unless(value != NULL); 1113 fail_unless(value != NULL);
@@ -1238,7 +1221,6 @@ EFL_START_TEST(eina_value_test_convert_short)
1238 eina_value_flush(&conv); 1221 eina_value_flush(&conv);
1239 1222
1240 eina_value_free(value); 1223 eina_value_free(value);
1241 eina_shutdown();
1242} 1224}
1243EFL_END_TEST 1225EFL_END_TEST
1244 1226
@@ -1256,7 +1238,6 @@ EFL_START_TEST(eina_value_test_convert_ushort)
1256 double d; 1238 double d;
1257 const char *str; 1239 const char *str;
1258 1240
1259 eina_init();
1260 1241
1261 value = eina_value_new(EINA_VALUE_TYPE_USHORT); 1242 value = eina_value_new(EINA_VALUE_TYPE_USHORT);
1262 fail_unless(value != NULL); 1243 fail_unless(value != NULL);
@@ -1341,7 +1322,6 @@ EFL_START_TEST(eina_value_test_convert_ushort)
1341 eina_value_flush(&conv); 1322 eina_value_flush(&conv);
1342 1323
1343 eina_value_free(value); 1324 eina_value_free(value);
1344 eina_shutdown();
1345} 1325}
1346EFL_END_TEST 1326EFL_END_TEST
1347 1327
@@ -1358,7 +1338,6 @@ EFL_START_TEST(eina_value_test_convert_int)
1358 double d; 1338 double d;
1359 const char *str; 1339 const char *str;
1360 1340
1361 eina_init();
1362 1341
1363 value = eina_value_new(EINA_VALUE_TYPE_INT); 1342 value = eina_value_new(EINA_VALUE_TYPE_INT);
1364 fail_unless(value != NULL); 1343 fail_unless(value != NULL);
@@ -1472,7 +1451,6 @@ EFL_START_TEST(eina_value_test_convert_int)
1472 eina_value_flush(&conv); 1451 eina_value_flush(&conv);
1473 1452
1474 eina_value_free(value); 1453 eina_value_free(value);
1475 eina_shutdown();
1476} 1454}
1477EFL_END_TEST 1455EFL_END_TEST
1478 1456
@@ -1486,7 +1464,6 @@ EFL_START_TEST(eina_value_test_convert_uint)
1486 double d; 1464 double d;
1487 const char *str; 1465 const char *str;
1488 1466
1489 eina_init();
1490 1467
1491 value = eina_value_new(EINA_VALUE_TYPE_UINT); 1468 value = eina_value_new(EINA_VALUE_TYPE_UINT);
1492 fail_unless(value != NULL); 1469 fail_unless(value != NULL);
@@ -1559,7 +1536,6 @@ EFL_START_TEST(eina_value_test_convert_uint)
1559 eina_value_flush(&conv); 1536 eina_value_flush(&conv);
1560 1537
1561 eina_value_free(value); 1538 eina_value_free(value);
1562 eina_shutdown();
1563} 1539}
1564EFL_END_TEST 1540EFL_END_TEST
1565 1541
@@ -1580,7 +1556,6 @@ EFL_START_TEST(eina_value_test_convert_long)
1580 double d; 1556 double d;
1581 const char *str; 1557 const char *str;
1582 1558
1583 eina_init();
1584 1559
1585 value = eina_value_new(EINA_VALUE_TYPE_LONG); 1560 value = eina_value_new(EINA_VALUE_TYPE_LONG);
1586 fail_unless(value != NULL); 1561 fail_unless(value != NULL);
@@ -1710,7 +1685,6 @@ EFL_START_TEST(eina_value_test_convert_long)
1710 eina_value_flush(&conv); 1685 eina_value_flush(&conv);
1711 1686
1712 eina_value_free(value); 1687 eina_value_free(value);
1713 eina_shutdown();
1714} 1688}
1715EFL_END_TEST 1689EFL_END_TEST
1716 1690
@@ -1731,7 +1705,6 @@ EFL_START_TEST(eina_value_test_convert_ulong)
1731 double d; 1705 double d;
1732 const char *str; 1706 const char *str;
1733 1707
1734 eina_init();
1735 1708
1736 value = eina_value_new(EINA_VALUE_TYPE_ULONG); 1709 value = eina_value_new(EINA_VALUE_TYPE_ULONG);
1737 fail_unless(value != NULL); 1710 fail_unless(value != NULL);
@@ -1839,7 +1812,6 @@ EFL_START_TEST(eina_value_test_convert_ulong)
1839 eina_value_flush(&conv); 1812 eina_value_flush(&conv);
1840 1813
1841 eina_value_free(value); 1814 eina_value_free(value);
1842 eina_shutdown();
1843} 1815}
1844EFL_END_TEST 1816EFL_END_TEST
1845 1817
@@ -1863,7 +1835,6 @@ EFL_START_TEST(eina_value_test_convert_float)
1863 float max_float_value = FLT_MAX; 1835 float max_float_value = FLT_MAX;
1864 float min_float_value = FLT_MIN; 1836 float min_float_value = FLT_MIN;
1865 1837
1866 eina_init();
1867 1838
1868 value = eina_value_new(EINA_VALUE_TYPE_FLOAT); 1839 value = eina_value_new(EINA_VALUE_TYPE_FLOAT);
1869 fail_unless(value != NULL); 1840 fail_unless(value != NULL);
@@ -2013,7 +1984,6 @@ EFL_START_TEST(eina_value_test_convert_float)
2013 eina_value_flush(&conv); 1984 eina_value_flush(&conv);
2014 1985
2015 eina_value_free(value); 1986 eina_value_free(value);
2016 eina_shutdown();
2017 1987
2018} 1988}
2019EFL_END_TEST 1989EFL_END_TEST
@@ -2027,7 +1997,6 @@ EFL_START_TEST(eina_value_test_array)
2027 char buf[1024]; 1997 char buf[1024];
2028 char *str; 1998 char *str;
2029 1999
2030 eina_init();
2031 2000
2032 value = eina_value_array_new(EINA_VALUE_TYPE_CHAR, 0); 2001 value = eina_value_array_new(EINA_VALUE_TYPE_CHAR, 0);
2033 fail_unless(value != NULL); 2002 fail_unless(value != NULL);
@@ -2126,7 +2095,6 @@ EFL_START_TEST(eina_value_test_array)
2126 fail_unless(c == 31); 2095 fail_unless(c == 31);
2127 2096
2128 eina_value_free(value); 2097 eina_value_free(value);
2129 eina_shutdown();
2130} 2098}
2131EFL_END_TEST 2099EFL_END_TEST
2132 2100
@@ -2139,7 +2107,6 @@ EFL_START_TEST(eina_value_test_list)
2139 char *str; 2107 char *str;
2140 const char *s; 2108 const char *s;
2141 2109
2142 eina_init();
2143 2110
2144 value = eina_value_list_new(EINA_VALUE_TYPE_CHAR); 2111 value = eina_value_list_new(EINA_VALUE_TYPE_CHAR);
2145 fail_unless(value != NULL); 2112 fail_unless(value != NULL);
@@ -2236,7 +2203,6 @@ EFL_START_TEST(eina_value_test_list)
2236 ck_assert_str_eq(s, "eina"); 2203 ck_assert_str_eq(s, "eina");
2237 2204
2238 eina_value_free(value); 2205 eina_value_free(value);
2239 eina_shutdown();
2240} 2206}
2241EFL_END_TEST 2207EFL_END_TEST
2242 2208
@@ -2250,7 +2216,6 @@ EFL_START_TEST(eina_value_test_hash)
2250 char *str; 2216 char *str;
2251 const char *s; 2217 const char *s;
2252 2218
2253 eina_init();
2254 2219
2255 value = eina_value_hash_new(EINA_VALUE_TYPE_CHAR, 0); 2220 value = eina_value_hash_new(EINA_VALUE_TYPE_CHAR, 0);
2256 fail_unless(value != NULL); 2221 fail_unless(value != NULL);
@@ -2356,7 +2321,6 @@ EFL_START_TEST(eina_value_test_hash)
2356 ck_assert_str_eq(s, "y"); 2321 ck_assert_str_eq(s, "y");
2357 2322
2358 eina_value_free(value); 2323 eina_value_free(value);
2359 eina_shutdown();
2360} 2324}
2361EFL_END_TEST 2325EFL_END_TEST
2362 2326
@@ -2370,7 +2334,6 @@ EFL_START_TEST(eina_value_test_timeval)
2370 char *str; 2334 char *str;
2371 char buf[64]; 2335 char buf[64];
2372 2336
2373 eina_init();
2374 2337
2375 value = eina_value_new(EINA_VALUE_TYPE_TIMEVAL); 2338 value = eina_value_new(EINA_VALUE_TYPE_TIMEVAL);
2376 fail_unless(value != NULL); 2339 fail_unless(value != NULL);
@@ -2440,7 +2403,6 @@ EFL_START_TEST(eina_value_test_timeval)
2440 2403
2441 2404
2442 eina_value_free(value); 2405 eina_value_free(value);
2443 eina_shutdown();
2444} 2406}
2445EFL_END_TEST 2407EFL_END_TEST
2446 2408
@@ -2453,7 +2415,6 @@ EFL_START_TEST(eina_value_test_blob)
2453 int i = 0x11223344; 2415 int i = 0x11223344;
2454 char *str; 2416 char *str;
2455 2417
2456 eina_init();
2457 2418
2458 value = eina_value_new(EINA_VALUE_TYPE_BLOB); 2419 value = eina_value_new(EINA_VALUE_TYPE_BLOB);
2459 fail_unless(value != NULL); 2420 fail_unless(value != NULL);
@@ -2529,7 +2490,6 @@ EFL_START_TEST(eina_value_test_blob)
2529 eina_value_flush(&other); 2490 eina_value_flush(&other);
2530 2491
2531 eina_value_free(value); 2492 eina_value_free(value);
2532 eina_shutdown();
2533} 2493}
2534EFL_END_TEST 2494EFL_END_TEST
2535 2495
@@ -2588,7 +2548,6 @@ EFL_START_TEST(eina_value_test_struct)
2588 char c; 2548 char c;
2589 char *str; 2549 char *str;
2590 2550
2591 eina_init();
2592 2551
2593 value = eina_value_struct_new(&myst_desc); 2552 value = eina_value_struct_new(&myst_desc);
2594 fail_unless(value != NULL); 2553 fail_unless(value != NULL);
@@ -2715,7 +2674,6 @@ EFL_START_TEST(eina_value_test_struct)
2715 2674
2716 eina_value_flush(&other); 2675 eina_value_flush(&other);
2717 eina_value_free(value); 2676 eina_value_free(value);
2718 eina_shutdown();
2719} 2677}
2720EFL_END_TEST 2678EFL_END_TEST
2721 2679
@@ -2742,7 +2700,6 @@ EFL_START_TEST(eina_value_test_array_of_struct)
2742 char *str; 2700 char *str;
2743 int i; 2701 int i;
2744 2702
2745 eina_init();
2746 2703
2747 value = eina_value_array_new(EINA_VALUE_TYPE_STRUCT, 0); 2704 value = eina_value_array_new(EINA_VALUE_TYPE_STRUCT, 0);
2748 fail_unless(value != NULL); 2705 fail_unless(value != NULL);
@@ -2792,13 +2749,11 @@ EFL_START_TEST(eina_value_test_array_of_struct)
2792 eina_value_flush(&array_item); 2749 eina_value_flush(&array_item);
2793 2750
2794 eina_value_free(value); 2751 eina_value_free(value);
2795 eina_shutdown();
2796} 2752}
2797EFL_END_TEST 2753EFL_END_TEST
2798 2754
2799EFL_START_TEST(eina_value_test_optional_int) 2755EFL_START_TEST(eina_value_test_optional_int)
2800{ 2756{
2801 eina_init();
2802 2757
2803 /* Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_OPTIONAL); */ 2758 /* Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_OPTIONAL); */
2804 /* Eina_Bool is_empty; */ 2759 /* Eina_Bool is_empty; */
@@ -2832,13 +2787,11 @@ EFL_START_TEST(eina_value_test_optional_int)
2832 /* ck_assert_int_eq(expected_value, actual_value); */ 2787 /* ck_assert_int_eq(expected_value, actual_value); */
2833 2788
2834 /* eina_value_free(value); */ 2789 /* eina_value_free(value); */
2835 eina_shutdown();
2836} 2790}
2837EFL_END_TEST 2791EFL_END_TEST
2838 2792
2839EFL_START_TEST(eina_value_test_optional_string) 2793EFL_START_TEST(eina_value_test_optional_string)
2840{ 2794{
2841 eina_init();
2842 2795
2843 Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_OPTIONAL); 2796 Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_OPTIONAL);
2844 Eina_Bool is_empty; 2797 Eina_Bool is_empty;
@@ -2873,13 +2826,11 @@ EFL_START_TEST(eina_value_test_optional_string)
2873 ck_assert_str_eq(expected_value, actual_value); 2826 ck_assert_str_eq(expected_value, actual_value);
2874 2827
2875 eina_value_free(value); 2828 eina_value_free(value);
2876 eina_shutdown();
2877} 2829}
2878EFL_END_TEST 2830EFL_END_TEST
2879 2831
2880EFL_START_TEST(eina_value_test_optional_struct_members) 2832EFL_START_TEST(eina_value_test_optional_struct_members)
2881{ 2833{
2882 eina_init();
2883 2834
2884 struct s { 2835 struct s {
2885 int64_t a; 2836 int64_t a;
@@ -2933,7 +2884,6 @@ EFL_START_TEST(eina_value_test_optional_struct_members)
2933 2884
2934 eina_value_free(value); 2885 eina_value_free(value);
2935 2886
2936 eina_shutdown();
2937} 2887}
2938EFL_END_TEST 2888EFL_END_TEST
2939 2889
@@ -2944,7 +2894,6 @@ EFL_START_TEST(eina_value_test_value)
2944 int i; 2894 int i;
2945 const char *str; 2895 const char *str;
2946 2896
2947 eina_init();
2948 2897
2949 fail_if(!eina_value_setup(&composed, EINA_VALUE_TYPE_VALUE)); 2898 fail_if(!eina_value_setup(&composed, EINA_VALUE_TYPE_VALUE));
2950 fail_if(!eina_value_setup(&v, EINA_VALUE_TYPE_INT)); 2899 fail_if(!eina_value_setup(&v, EINA_VALUE_TYPE_INT));
@@ -2967,7 +2916,6 @@ EFL_START_TEST(eina_value_test_value)
2967 2916
2968 eina_value_flush(&v); 2917 eina_value_flush(&v);
2969 eina_value_flush(&composed); 2918 eina_value_flush(&composed);
2970 eina_shutdown();
2971} 2919}
2972EFL_END_TEST 2920EFL_END_TEST
2973 2921
@@ -2976,7 +2924,6 @@ EFL_START_TEST(eina_value_test_value_string)
2976 Eina_Value composed, v, str_v; 2924 Eina_Value composed, v, str_v;
2977 const char *msg = "A string", *str; 2925 const char *msg = "A string", *str;
2978 2926
2979 eina_init();
2980 2927
2981 fail_if(!eina_value_setup(&composed, EINA_VALUE_TYPE_VALUE)); 2928 fail_if(!eina_value_setup(&composed, EINA_VALUE_TYPE_VALUE));
2982 fail_if(!eina_value_setup(&v, EINA_VALUE_TYPE_STRING)); 2929 fail_if(!eina_value_setup(&v, EINA_VALUE_TYPE_STRING));
@@ -3000,7 +2947,6 @@ EFL_START_TEST(eina_value_test_value_string)
3000 eina_value_flush(&str_v); 2947 eina_value_flush(&str_v);
3001 eina_value_flush(&composed); 2948 eina_value_flush(&composed);
3002 eina_value_flush(&v); 2949 eina_value_flush(&v);
3003 eina_shutdown();
3004} 2950}
3005EFL_END_TEST 2951EFL_END_TEST
3006 2952