Commit Graph

95 Commits

Author SHA1 Message Date
Cedric BAIL 9a74e6aec4 eina: all Eina_Stringshare printf variant now return empty string as expected.
Previously Eina_Stringshare printf variant where returning NULL with ("%s", ""). This
is highly disturbing as you would have gotten "(null)", if you asked for ("s", NULL).
To clarify and make things logical, we now return "".
2015-01-08 12:36:27 +01:00
Jean-Philippe Andre 864394e793 Eina: Fix eina_condition_timedwait once again
Much confusion with this spaghetti code of #ifdefs and clocks.
So, we can't use CPU clocks for the timedwait, this doesn't make
sense (and it's explicit in the manpage, too).

But we can use CLOCK_MONOTONIC or CLOCK_MONOTONIC_RAW which are
much better than the wall clock (because of ntp updates, etc...)

The test case tests that the cond actually waited for as long as was
requested and for not too long either.

This is hopefully a final fix for T1701.
2014-10-30 20:21:41 +09:00
Stefan Schmidt d3eaafe594 tests/eina: Enable eina_condition_timedwait() now that it should work.
Commit again now that compile problems are solved.
2014-10-29 15:35:30 +01:00
Stefan Schmidt 2409805f05 Revert "tests/eina: Enable eina_condition_timedwait() now that it should work."
This has to work until we really fixed up eina_condition_timedwait()

This reverts commit 5c9024424f.
2014-10-23 15:13:20 +02:00
kabeer khan 5289a4375d Eina Test : Added test case for convert float in eina_test_value
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1567
2014-10-23 08:34:14 -04:00
Stefan Schmidt 5c9024424f tests/eina: Enable eina_condition_timedwait() now that it should work. 2014-10-23 11:09:55 +02:00
kabeer khan 3ad485b8e0 eina: add test cases for Eina_Trash
Summary:
New test case for Eina_Trash was added

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: raster, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1460

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-22 14:59:27 +02:00
kabeer khan d13f16b0e2 eina: resolved TODO in eina tests - added delete array list
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1428

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-10 12:51:27 +02:00
Gwanglim Lee 3d534e87c3 eina: Eina_Tiler - return a NULL if intersection of two tilers doesn't exist
Summary:
change eina_tiler_intersection to return a NULL if intersection
of two tilers doesn't exist. and add test case to check it.

This doesn't break ABI/API as this call could already return a NULL value and it
should have been handled by the caller anyway. This just make an expected behavior
more correct.

Test Plan: run eina_suite after building eina test suite

Reviewers: cedric, raster, torori, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1205

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-21 19:33:27 +02:00
Daniel Zaoui 0ee9dc4d82 Eina: fix annoying warning during tests. 2014-07-21 15:03:38 +03:00
ms ce8d67922f test_test
Reviewers: kimcinoo

Reviewed By: kimcinoo

Subscribers: kimcinoo, cedric

Differential Revision: https://phab.enlightenment.org/D1153
2014-07-10 10:39:06 +02:00
MinJeong Kim 61cecf1f3f eina-tiler:add union, subtract, intersection, equal apis for tilers
Summary:
Support union, subtract, intersection, equal(comparison) between tilers.
@feature

Test Plan: Test with added test case(src/tests/eina/eina_test_tiler.c) and the example(src/examples/eina/eina_tiler_02.c)

Reviewers: gwanglim, devilhorns, raster, zmike, cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D880
2014-05-28 16:51:30 +09:00
Sylvain Laperche 53e0a2d6bd eina: Fix bug in eina_convert_itoa
The current implementation of eina_convert_itoa cannot convert INT_MIN.

When the input number is negative, the function negates it and this is
an undefined behavior for INT_MIN since -INT_MIN cannot be represented
in a signed int.

@fix T1062

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-03-07 14:17:28 +09:00
Cedric BAIL e6faf98868 eina: indent test to up to date standard. 2014-03-07 14:17:28 +09:00
Cedric BAIL 563ea6a01c tests: remove warnings. 2014-03-06 14:27:26 +09:00
Cedric BAIL f5c125dfc2 eina: fix test suite for rwlock... hopefully. 2014-01-24 12:00:32 +09:00
Jérémy Zurcher 316dc52d2f eina_tls: add eina_tls_cb_new(Eina_TLS *key, Eina_TLS_Delete_Cb delete_cb)
Summary:
   delete_cb is called at thread exit for each Eina_TLS keys used by the thread

Details:
   posix:
      pthread_key_create(key, delete_cb); does it
   win32/wince:
      eina_tls_free/new un/registers key&&cb into a static eina_list.
      eina_tls_set add the key to an eina_list in Eina_Thread_Win3.
      this list is cleared and callbacks are called in _eina_thread_join()

Test Plan: win32/wince has to be tested, I have no setup to do it.

Reviewers: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D489
2014-01-23 14:50:08 +09:00
Cedric BAIL 55a56fe5c0 eina: add eina_{str,bin}buf_manage_read_only_new_length().
It is sometime useful to start from a defined buffer, but to not touch it
until needed. This make life of caller more easier as they don't need to
duplicate the buffer themself as Eina will now take care of that.
2014-01-20 13:04:07 +09:00
Shinwoo Kim 37f7bb981c [eina] add test case - eina_list_clone, eina_list_reverse_clone 2014-01-10 22:46:52 -08:00
Cedric Bail 41c28c3deb eina: fuzze test the eina_hash_string_superfast to. 2013-12-04 19:04:24 +09:00
Cedric Bail 517f339fd0 eina: add fuzzy test of eina_hash. 2013-12-04 18:33:04 +09:00
Cedric Bail d31a85bb51 eina: add fuzzy testing of the red black tree. 2013-12-04 15:20:17 +09:00
Jérémy Zurcher 58b578c9b0 eina: fix a possible race condition during eina_file_close.
replay 7e8fb93 without the breakage
2013-11-20 10:22:00 +01:00
Jérémy Zurcher 8a3e021298 Revert "eina: fix a possible race condition during eina_file_close."
it breaks everything

This reverts commit 7e8fb93206.
2013-11-20 10:22:00 +01:00
Cedric Bail 7e8fb93206 eina: fix a possible race condition during eina_file_close.
The lock on the main hash was taken to late (after we took the decision
to remove the targeted Eina_File from the cache), this means it was possible
to get an Eina_File from the cache that was going to be removed. This patch
attempt to fix that potential race condition.

Hopefully should fix T461.
2013-11-20 13:02:37 +09:00
Cedric Bail 2dc092d36e eina: adjust precision for all our targeted convertion. 2013-11-12 20:12:54 +09:00
Cedric Bail 1281a8369f eina: fix uninitialized data use. 2013-11-12 19:01:10 +09:00
Cedric BAIL da559ee5d0 eina: use portable infrastructure to detect page size. 2013-11-10 09:26:12 +01:00
Cedric Bail 65c33f6369 eina: eina_lock_debug is only on Eina_Lock. 2013-11-09 20:06:59 +09:00
Cedric Bail 91025a1e04 eina: fix warning of unsigned int being compared to an int. 2013-11-09 20:06:36 +09:00
Cedric Bail be3afd8f4b eina: update Eina_Cow test to latest API change. 2013-11-04 12:47:12 +09:00
Cedric Bail fe5dd4bcda eina: add test for old ABI supported function, but not exposed anymore. 2013-10-25 20:16:10 +09:00
Cedric Bail 7f8665a266 eina: improve test coverage of Eina_File API. 2013-10-25 19:57:57 +09:00
Cedric Bail cae6b0b0e4 eina: improve test coverage of virtual file. 2013-10-25 19:50:14 +09:00
Cedric Bail 39931d295b eina: use Eina_Barrier to improve coverage and reduce race condition during testing.
This should hopefully solve the failing test on Jenkins. As I can't reproduce them
here, it is just an educated guess... We will see !
2013-10-25 15:12:28 +09:00
Cedric Bail 577ae1debc eina: let's add some straight forward test. 2013-10-16 16:51:41 +09:00
Carsten Haitzler 69e27abdc3 eina - and e3fl in general - stop using eina_error_get/set - useless really 2013-10-11 16:50:40 +09:00
Oleksander Sirook 337b3d4daf eina: add test for 'eina_file_map_new' function. 2013-08-13 17:31:41 +09:00
Vladislav Brovko 56adc51e83 eina: add Eina_Value tests convert from short, int. 2013-07-18 16:19:26 +09:00
Sergii Kanaev f21bcaccbb eina: improve test coverage for Eina_Clist.
Add tests for eina_clist_add_after, eina_clist_add_head, eina_clist_next
and eina_clist_add_tail.
2013-07-09 10:23:00 +09:00
Daniel Willmann 3e5ff22ab9 eina_test_fp: Improve speed of eina_fp test
Test less values in between, but still have a decent combination of
large/small values to test.

Fixes -WTasn

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-06-27 14:34:02 +01:00
Sebastian Dransfeld 068f1ddc62 efl: formatting 2013-06-20 13:08:36 +02:00
Daniel Willmann 0e51bff61a eina_test_str: Make sure we have an empty string before using strcat
Caused issues with address sanitizer. Just calling allocating memory for
a string does not mean that it's empty/NULL-terminated.
2013-06-12 23:57:42 +01:00
Jérémy Zurcher 22220ca70a improve eina_str coverage
my time killer, what a sad life ;))
2013-06-12 23:34:40 +02:00
Jérémy Zurcher d0d1b705fb indent eina_list tests 2013-06-12 23:34:40 +02:00
Eduardo Lima (Etrunko) d3292a7ae9 Split .gitignore into multiple files
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-06-11 18:18:50 -03:00
Daniel Willmann 7c20a90c3d eina_test_fp: Test multiplication and division as well
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-05-17 17:10:55 +01:00
Jérémy Zurcher 52b20f0334 eina_stringshare: improve coverage 2013-05-08 12:14:57 +02:00
Jérémy Zurcher 2036f7d344 eina: add eina_inlist_first and eina_inlist_last
- both as static inline functions
   - test added in eina_inlist_simple
2013-04-09 12:03:05 +02:00
Cedric BAIL be2cebab17 eina: fix test logic after change in Eina_Cow GC. 2013-04-03 19:21:51 +09:00