Commit Graph

343 Commits

Author SHA1 Message Date
Vincent Torri 8a7cb97e02 Eina: implement strtod in C locale and remove linkl against msvcr100.
Summary:
This fixes compilation on Windows

More precisely edje_cc could not compile emotion edc files, so it was a runtime problem
because of msvcr100 link.

Add more tests than before

Test Plan: compilation

Reviewers: raster

Subscribers: zmike, stefan_schmidt, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7926
2019-02-28 14:36:42 +01:00
Cedric BAIL e863a3d28a eina: add tests for the new Eina_Value convert functions.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7651
2019-01-23 10:54:07 -08:00
Cedric BAIL d4ab211968 eina: add tests for Eina_Value utility function eina_value_*_get.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7649
2019-01-23 10:54:03 -08:00
Marcel Hollerbach e43f090265 cmake: remove!
This build was never complete and also was not maintained probebly.

It is also dropped in favour of meson which is cool, merged, works & is fast.

Differential Revision: https://phab.enlightenment.org/D7010
2018-12-20 20:07:26 +01:00
Marcel Hollerbach 6c8cebf403 Revert "Revert "eina: add locale-independent eina_convert_strtod_c function""
This reverts commit ddd2638758.
2018-12-05 11:17:53 +01:00
Carsten Haitzler ee7a97d898 eina iterator tests - use same unisnged ints to store - warn
use unsigned ints to we have no more wantings about signed compares
2018-12-04 08:24:02 +00:00
Stefan Schmidt ddd2638758 Revert "eina: add locale-independent eina_convert_strtod_c function"
This reverts commit bef1c5cc43.

The commit breaks the build on macos. I gave it soem time to get fixed
up quickly, but its late Friday night in Korea now and this is unlikely
to get fixed until Monday. Revert here until fixed.

./src/lib/eina/eina_private.h:158:1: error: unknown type name 'locale_t'

https://travis-ci.org/Enlightenment/efl/jobs/461790674
2018-11-30 15:30:01 +01:00
Youngbok Shin bef1c5cc43 eina: add locale-independent eina_convert_strtod_c function
strtod's behavior is changed by system locale.
http://man7.org/linux/man-pages/man3/strtod.3.html
https://en.wikipedia.org/wiki/Decimal_separator

Because of this, strtod(0.5) returns 0.0 in some locales.
When a given value string is locale-independent, strtod has to be
replaced to eina_convert_strtod_c function.
Internally, it calls strtod_l function with "C" locale.

@feature

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D6644
2018-11-29 16:15:59 -08:00
Cedric BAIL aac7d099a1 eina: add tests for eina_multiple_iterator_new.
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7287
2018-11-23 10:13:56 -08:00
Cedric BAIL a8f520188a eina: add test for Eina_Iterator over pure C array.
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7285
2018-11-23 10:13:52 -08:00
Carsten Haitzler 96228d3c22 eina test - fix build with magic debug disabled 2018-11-12 17:05:46 +00:00
Carsten Haitzler dd677aa2f6 eina file test - warn - silence wanring wirth a bit of hand str trunc
truncation is intended. the way i can find to silence the warning is
use memcpy with a manually computed size...
2018-11-09 12:18:59 +00:00
Carsten Haitzler f447bc1316 eina iterator test - warn - fix prototype of cb func to have right params
fix warning. wrong func prototype for cb... ad void *data param at end.
2018-11-09 11:43:59 +00:00
Carsten Haitzler ba372625a9 eina magic debug test - fix xarnings about double-defining
only domagic debug test if magic debug is enabled, otherwise have no
test. fixes warning
2018-11-09 11:43:59 +00:00
Carsten Haitzler b4f9021e55 eina strbuf tests - fix tests to properly check fail unless conditions
the contiions were wrong - warnings picked it up. fix.
2018-11-09 11:43:59 +00:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Marcel Hollerbach e31ce7b287 eina_vpath: introduce eina_vpath in style of snprintf
Summary:
this can be usefull for later regactor usages.

Depends on D6742

Reviewers: zmike, stefan_schmidt, #committers

Reviewed By: zmike, #committers

Subscribers: #reviewers, segfaultxavi, cedric, #committers, zmike

Tags: PHID-PROJ-55rnlag4d454jfmlmuhu

Differential Revision: https://phab.enlightenment.org/D6743
2018-08-20 12:56:51 -04:00
Mike Blumenkrantz 1c029b8fd9 tests/eina: suppress deprecated api warnings for eina abi test
Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: cedric, #reviewers, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D6810
2018-08-14 17:26:08 -04:00
Mike Blumenkrantz b14ef34ab8 tests/eina: make inclusion for define explicit and more compatible
Summary:
signal.h is not included with all build options somehow, making this
a bit unreliable. also check for define existence for random platforms
which don't define this symbol

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: ManMower, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6535
2018-07-09 13:31:45 -04:00
Mike Blumenkrantz dca39ebec1 tests/eina: disable eina debug signal handling test in non-fork mode
Summary: signal tests can only be used in fork mode or else they just fail

Reviewers: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6477
2018-07-03 12:46:49 -04:00
Mike Blumenkrantz 32cebe903d tests: split a large failure case for eina_file tests to provide more info
Summary:
each failure case should always be separate in order to provide the highest
degree of detail available if a test fails

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: ManMower, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6373
2018-06-25 15:20:37 -04:00
Mike Blumenkrantz 00bc3af4dd tests: add test for eina_debug signal handling
Summary:
currently this crashes, so add a simple test to ensure that it works
eventually

ref T7028

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7028

Differential Revision: https://phab.enlightenment.org/D6311
2018-06-19 14:04:40 -04:00
Mike Blumenkrantz 81d97eb45a tests: ck_assert_ptr_null -> ck_assert_ptr_eq 2018-04-05 14:04:21 -04:00
Mike Blumenkrantz 681cfc9177 tests: ck_assert_ptr_null -> ck_assert_ptr_ne 2018-04-05 13:43:54 -04:00
Mike Blumenkrantz ab37ca4d7b tests: increase step sizes for eina_fp_div and eina_fp_mul tests
fix T6841

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:32 +02:00
Mike Blumenkrantz 594b5f4967 tests: reduce looping in slstr_thread thread callbacks
this works out to the same number of total tests as slstr_many but
now split across all the threads

fix T6846

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:32 +02:00
Mike Blumenkrantz 88436ca89c tests: reduce looping in eina_test_spinlock
no changes to coverage

fix T6845

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:32 +02:00
Mike Blumenkrantz 7819d56da6 tests: add eina_test_hash_int64_fuzze
ref T6844

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:32 +02:00
Mike Blumenkrantz 4ac90511b9 tests: reduce looping in eina_ustringshare_putstuff
fix T6843

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:32 +02:00
Mike Blumenkrantz e8878e19b7 tests: reduce looping in eina_binshare_putstuff test
also slightly increase eina_hash coverage

fix T6843

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:31 +02:00
Mike Blumenkrantz d5583d74ea tests: improve eina_binshare_collision test
remove rand() usage and loop less

fix T6843

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:31 +02:00
Mike Blumenkrantz 7f54a431a3 tests: change eina cmdline test names to match api namespaces
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:31 +02:00
Mike Blumenkrantz 910db08a6b tests: remove 9900 loop iterations from eina_test_file_thread
no changes in coverage

fix T6842

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:31 +02:00
Mike Blumenkrantz e6c8bf7fbf tests: rework eina hash fuzzing tests
these are supposed to be for testing the finding of values not in the
hash, not basic hash operations

fix T6839

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:31 +02:00
Mike Blumenkrantz 631f506a6f tests: fix mem leak in eina_test_hash_add_del_by_hash
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:31 +02:00
Mike Blumenkrantz f2dc01a8dc tests: reduce malloc usage in eina_test_hash_extended
ref T6839

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:30 +02:00
Mike Blumenkrantz 947c954141 tests: reformat eina_test_hash.c
no functional changes

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:30 +02:00
Mike Blumenkrantz eabd003b00 tests: use namespacing for eina hash tests
no functional changes

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:30 +02:00
Mike Blumenkrantz 80569fd7a6 tests: use namespacing for safepointer test names
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:30 +02:00
Mike Blumenkrantz 908ba030bf tests: reduce array size in safepointer tests
this reduces test runtime by ~1.0s while having no effect on coverage

fix T6836

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:30 +02:00
Mike Blumenkrantz 3162240921 tests: simplify eina safepointer tests to be more readable
no functional changes

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:29 +02:00
Mike Blumenkrantz 2bbc300b80 tests: use EINA_C_ARRAY_LENGTH macro in safepointer tests
no functional changes

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:29 +02:00
Mike Blumenkrantz 1f7f7297e3 tests: rework strbuf append/prepend tests
there's no point in iterating this many times; the base step size is 32
and so each loop will only increase the buffer...not at all since it takes
3 loops for the buffer to increase by the step size

verify that the buffer increases and then stop instead of spinning uselessly

fix T6835

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:29 +02:00
Mike Blumenkrantz 0f3f651f81 tests: reformat eina_test_strbuf.c
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:29 +02:00
Mike Blumenkrantz 26103722be tests: use namespacing for eina strbuf tests
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:29 +02:00
Mike Blumenkrantz 11d695cfcd tests: improve eina_test_list_shuffle
reduce iteratons by a hundredfold, remove verifying of rand() seed,
check whether shuffle actually shuffles

fix T6833

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:29 +02:00
Mike Blumenkrantz 8ca6102f62 tests: rename eina_list tests to use list namespace for readability
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:28 +02:00
Mike Blumenkrantz 05edb41388 tests: remove sleep calls from eina_barrier_test_simple
the timing does not matter for these tests, so there's no point in
randomly waiting longer and delaying build completion

fix T6832

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:28 +02:00
Mike Blumenkrantz 5427cd31d1 tests: improve coverage in eina_rbtree_fuzzy test
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:28 +02:00
Mike Blumenkrantz 0683552037 tests: simplify eina_rbtree_fuzzy test and speedup by infinity%
this test is to try and match values in a tree which have not been
inserted, so remove irrelevant insert/remove operations as well as
insane looping

fix T6830

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:28 +02:00