Commit Graph

10 Commits

Author SHA1 Message Date
Carsten Haitzler 2178258105 tests - remove one of the eina strtod tests as libc is failing
see the comments above the test explaining why it's removed (libc
fails, not eina and having our tests fail because eina is a bit more
robust than libc is not a sane thing to have). but here is the comment
for git history spelunking:

this test isn't viable because libc actually fails the conversion (testing
glibc 2.28 on arch linux). either libc doesn't like the space at the start
thus doesn't skip it but assumes END of numbver string thus not converting
and returning NULL, or it doesn't like InFiNiTyfoo in some way, but either
way this test shows eina to be more robust and do some kind of conversion
and libc to fail and return NULL from strtod into the string pointer. it
also doesnt return an infinite fp thus hitting the default: case and thus
failing etc. ... so all in all remove the test as all it does it cause
failures and if anything shows libc to be failing more than eina.

@fix
2019-04-07 14:47:35 +01:00
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
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
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
Mike Blumenkrantz 624925fe6e 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>
2018-04-05 11:10:26 +02:00
Mike Blumenkrantz adc601aca2 tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros

timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:25 +02:00
Vincent Torri 1b143f233e Test rework #10: Eina
mainly minor stuff: whitespaces, order of includes, ... Just don't fear the number
of changed files :-)
2016-02-16 12:41:06 +00: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
Vincent Torri 785f2a6b3a merge : add eina
currently, examples, tests and benchmark are not set. That's the next things i'll do


SVN revision: 76710
2012-09-16 10:57:48 +00:00