Commit Graph

597 Commits

Author SHA1 Message Date
Avi Levin dad44a7100 Eo tests: Fix bad free in eo_test_value
When running eo_test_suite we get an memory error: "double free or corruption".
That error arises because we try to free an Eina_Value value in eo_test_value
that doesn't need to freed.
I switched the eina_value_free to wina_value_flush, the proper way of
releasing it.

@fix
2015-01-12 11:56:42 +00:00
Stefan Schmidt 1f7c6c5783 tests/ecore_thread: Disable verbose logging with printf
If we are going to test for 10000000 messages we should not print out for each
of them to stdout. The log file for ecore_suite will catch them all. It ended
up being 199MB on my machine just filled with these debug statements.

I left it in in case someone needs it for debugging but we should not have it
on by default.
2015-01-08 17:19:58 +01:00
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 21984b1d58 Evas masking: Add some test cases
Here are only 3 very basic test cases.

One is a dumb set/get to check that image objects can
be passed as clippers.

The other one is a pixel verification test with extremely
basic data (NEAREST scaling and just rectangles). It also
compares text clipping and masking.

The last one performs a very basic verification that masks
of masks work.
2015-01-07 15:06:03 +09:00
Jean-Philippe Andre a86f799542 tests: Remove file after Evas 3D save test
This should remove src/.eet and maybe src/.ply

make distcheck would fail on my machine because src/.eet
was not removed.
2015-01-07 15:05:04 +09:00
Vitor Sousa 4222cd3f50 eolian_cxx: Fix compilation of inheritance from Eolian generated classes
Updated the code for the "inheritance helper" functions and classes
to be in conformance with the new wrapper architecture.

Member variable "parents" of efl::eo::eo_class struct was split in two
member variables, "ancestors" and "parents", the former containing all
Eo class ancestors and the later only the direct bases.
Changed all required files accordingly.

Check to avoid using biding string when the parameter is @out now matches
any variation of "char".

Add default constructor to efl::eo::concrete in order to allow it to be
NULL initialized in the "inheritance helper" classes.

Removed conflicting parent_set member function in the efl::eo::inherit
class.

Removed the "inheritance_extension_function" generator since it is no
longer used.
2015-01-05 15:52:27 -02:00
Larry Jr 2b12114777 allow C++ user create new classes inheriting from Eolian generated Classes 2015-01-05 15:52:27 -02:00
Vitor Sousa 0685885c2a eolian_cxx: Add implicit conversion of the returned pointer of C++ wrappers
Overloaded address-of operator for C++ Eolian wrappers for implicit converting
to any ancestor pointer type when getting the object memory address.

Added new grammars to aid the creation of the pointer wrappers
responsible of doing the implicit conversions.

Added a unit test which checks the address-of overload for arbitrary classes.
Added new .eo files to be used in it.
2015-01-05 15:52:27 -02:00
Vitor Sousa ed75aa32d6 cxx: General C++ Eo wrapper generation improvement
Using a new architecture in the generated files that simplify multiple
inheritance and allows the use of interface types as parameters.

No longer using a hand-crafted C++ header for eo_base.eo.
This file was added to the generation process.

Updated all files that are dependent in the hand-crafted eo_base
C++ header.

Now there is a class that contains the essentials functions of the former
eo::base wrapper and that is used to create (through inheritance) the
"concrete" classes for all Eo generated wrappers.

No longer binding any function or property that are protected, private or
legacy for now.

eolian_type_instance is now a struct with general information for the
whole type.

Added the new header file namespace_generator.hh to hold namespace
generation grammars.

Separated declaration and definition of Eo wrappers methods.

Referring for most objects by its full name (starting at the global
namespace ::) in the generated files.

Created additional helper grammars to avoid code replication.

Removed a TODO comment referring to a doubt about inheritance of
constructor methods.
Added a TODO comment regarding memory allocation for callbacks in static
member functions.
2015-01-05 15:52:27 -02:00
Vitor Sousa 132abc3534 eolian_cxx: Fix Eolian C++ generated wrapper inconsistencies
In convert.cc: Reading functions instead of implements to convert the
Eolian_Class. It avoids creation of methods that do not belong to the
class, in special it avoids calling the default constructor twice in the
generated code.

No longer generating one constructor in the C++ wrapper for each eolian
class constructor, since the correct behavior demands that all constructor
should be called. Now the wrappers have "constructor methods" that
must be called when creating a new object.

Updated test cases and examples to match the new interface. Some class
constructors and some test cases have to be removed since they were based
on the wrong assumption that constructors are mutually exclusive.

Created new generators for forwarding parameters and for looping over
the relevant parameters to the C++ wrapper executing a generic lambda.

Added a TODO comment regarding the call of constructor methods of all
base classes. Currently there is no base type with constructors, so this
situation should be discussed more.

Added a TODO comment regarding the way callback parameters are being
processed.
2015-01-05 15:52:27 -02:00
Vitor Sousa ed8ce801cb eolian_cxx: Assertions to ensure C++ wrapper compatibility with Eo*
Added static assertion in the generated header to ensure that the wrapper
have the same size of Eo*, thus grating compatibility between these types.

Added static assertion in the generated header to ensure that the wrapper
have standard layout. This should ensure correct type sizes when dealing
with inheritance.

Created a test to ensure that eo::base and the eolian wrappers have the
same size of a Eo*.

Added eolian_cxx_test_wrapper.cc to the list of test source files in
Makefile_Eolian_Cxx.am.
2015-01-05 15:52:27 -02:00
Vitor Sousa 1cbbb9a577 eina_cxx: Using eina::eina_init in all tests cases
Removed the eina_init call from the test suite main function to enforce
that each test case creates an instance of the eina::eina_init object.

Added an eina::eina_init object instanciation for each test case that
were lacking this code.
2015-01-05 15:52:27 -02:00
Vitor Sousa ee81566ac8 eina_cxx: Fix eina::accessor for C++ Eo wrappers
Created a specialization of the eina::accessor for C++ Eo wrappers.

Created an override of the "accessor" methods in the eina::list specialization
for Eo wrappers (in eina_list.hh). It is necessary to create accessors with the
correct type.

Created specializations of std::is_base_of to avoid compilation errors related
with _Eo_Opaque type.

Added new test cases in "eina_cxx_test_accessor.cc" to test the accessor
specialization.

Added efl::eina::eina_init to the existing test cases to correctly do the
on demand initialization required by the tests.

@fix
2015-01-05 15:52:27 -02:00
Cedric BAIL 21707789d7 evas: check for grayscale png and jpeg. 2014-12-28 22:14:05 +01:00
Bogdan Devichev c471665ac8 evas: make Evas 3d mesh is inherited from Efl.File (functions file_set and save) 2014-12-23 21:20:21 +01:00
Bogdan Devichev dd60525798 evas: a _mmap version of the file_set is added. 2014-12-23 21:20:21 +01:00
Bogdan Devichev 4acbae6947 evas: test cases are changed according to changes of API in step 4. Specific logic in obj_saver is removed for standardization of API. 2014-12-23 21:16:19 +01:00
Daniel Zaoui bcd7736914 Eo: fix error handling when too many deletions invocations occur.
Before this fix, when a deletion was invoked twice on an object, a
wrong message ("...You wrongly call eo_unref() within a destructor...")
was printed. This was caused by the del_triggered flag that was not
resetted when the destruction finished.

This patch fixes this behavior by printing the right message on a double
deletion.
2014-12-05 03:38:16 +02:00
Daniel Kolesa d24220221a eolian: eolian_function_is_c_only tests 2014-12-03 15:04:40 +00:00
Carsten Haitzler 8669ab8a98 eet - add new api to verify eet file against stored cert
this api makes it far more obvious as to how to verify an eet file via
the eet identify mechanisms that use x509 certificates to sign files.
this is consistent with the api used to generate the key for sigining
thus you can use the same certificate file to compare against for
identify.

@feature
2014-11-28 17:56:27 +09:00
Thiep Ha c30303d7e8 edje entry: improve selection performance
Summary:
The selection performance is slow if we select large chunk of text.
This is caused by many rectangles created and deleted.
This patch provides a way to improve it by combine selection rectangles
of line in middle into one rectangles (i.e, if we have N lines,
the selection rectangle for lines 2 to N-1 will be combined into one.)

@feature

Reviewers: raster, cedric, tasn

Subscribers: herdsman, woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D1508
2014-11-26 11:29:09 +00:00
Thiep Ha e9a40835f2 textblock: correct text position for RTL text with margins
Summary:
If a RTL textblock has right margin, text is wrongly placed
(right margin is moved to left).
This patch fixes this issue.
Test cases are also added to test text position with margins.

@fix

Reviewers: tasn, herdsman

Subscribers: woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D1691
2014-11-26 10:18:49 +02:00
kabeer khan 0ba1239ac1 Ecore FIle: Added test case for ecore_file download
Summary:
Added test cases for ecore_file_download and ecore_file_download_full

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

Reviewers: devilhorns, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1683
2014-11-24 09:36:02 -05:00
Stefan Schmidt e42db35528 tests/eo: Do not test for an integer when you get a pointer.
It works but the compiler is right when complaining about it. fail_unless()
expects and integer but we passed in a pointer. Negate the pointer and use
fail_if() like we do in all other places.
2014-11-21 10:20:36 +01:00
Daniel Kolesa d26152391f eolian: add support for @optional ctor tag
This implements task T1804.
@feature
2014-11-20 15:21:55 +00:00
Jérémy Zurcher 18ceed4daf Eo: protect against recursive object destruction calls, fixes T1741
Summary:
    Eo: semantic obj->del replaced by obj->destructed
    Eo: protect against recursive object destruction calls
    Eo: add tests for bfada4b

Reviewers: JackDanielZ, tasn

Reviewed By: tasn

Subscribers: cedric

Maniphest Tasks: T1741

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

Fixes T1741

@fix
2014-11-18 15:25:34 +00:00
kabeer khan 9f65759387 Ecore File : Added test suite for Ecore File module
Summary:
Added 3 test cases. First to test initialise, shutdown Ecore_File module.
Second to test all file operation functions defined in the module.
Third to test ecore file monitor

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

Reviewers: devilhorns, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1662
2014-11-18 10:51:42 +01:00
Bogdan Devichev d896dfb342 evas: Evas_3D - add .ply export/import.
Summary:
.ply format is important for relation blender and EFl, because in blender exist only two mesh export API: bpy.ops.import_mesh.ply and bpy.ops.import_mesh.stl. One of them is necessary for .edc 3D generator. Which I writing now.
Sorry, it isn't like image loader. Refactoring of import/export will be soon.

Reviewers: Oleksander, artem.popov, Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-11-14 07:11:15 +01:00
Stefan Schmidt 1c17188b1c tests/elocation: Disable problematic elocation status test for now.
This seems to fail in some cases. Have it disabled for now to have the
rest of the tests run stable.
2014-11-11 12:26:56 +01:00
Stefan Schmidt 699e5a2bed tests/elocation: Enhance tests to wait for callback arrival.
These message are passes async over dbus so we better wait until we see the
reply if we want to have a test case that is somewhat useful.
2014-11-11 11:10:12 +01:00
Stefan Schmidt 2358c69983 tests/elocation: Generate libcheck xml output for jenkins
Jenkins reads the xml file generated by libcheck to display the coverage.
Also setup EFL_RUN_IN_TREE to make sure all paths are setup correctly.
2014-11-11 11:10:12 +01:00
Stefan Schmidt 0d6dcb9581 tests/elocation: Avoid testing of non elocation things in the elocation suite
These inits and shutdown are already done in elocation_init() directly. As we
do not use any of its functionality here we better concentrate on elocation
unit tests in here.
2014-11-11 11:10:12 +01:00
Stefan Schmidt d3476bf778 tests/elocation: Add elocation test suite.
Not covering all cases yet but still a good start.
2014-11-11 11:06:05 +01:00
Stefan Schmidt 4d66ed9b1f Revert "Ecore File : Added test suite for Ecore File module"
Same problem with this as for the revert before. Fails when run the second
time. See last commit for details.

This reverts commit 5866e166bb.
2014-11-10 11:40:55 +01:00
Stefan Schmidt 2f9d5d19fe Revert "Ecore File: Added test case for Ecore File Monitor"
This breaks make check and distcheck when run more than once. I first look
seems to indicate that the hardcoded /tmp/rootDir is not removed during
shutdown and fials to be created the next time as it is already present.

When removing it manually another problem with the subdir popped up. No
time to fix this just before I want to do the release so this gets
reverted. Please fix this up and submit it again for 1.13. Thanks.

This reverts commit cb84017a3f.
2014-11-10 11:38:10 +01:00
Stefan Schmidt 1721c8e043 Revert "ecore-tests: Fix formatting"
This commit alone is fine but it does changes to another commit that needs
reverting as it breaks make check / distcheck and thus this one has to be
reverted as well.

This reverts commit 652e2f688b.
2014-11-10 11:36:48 +01:00
Chris Michael 652e2f688b ecore-tests: Fix formatting
Summary: No functional changes, just formatting.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-11-03 08:17:34 -05:00
kabeer khan cb84017a3f Ecore File: Added test case for Ecore File Monitor
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1634
2014-11-03 08:16:57 -05: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
kabeer khan 5866e166bb Ecore File : Added test suite for Ecore File module
Summary:
Added 2 test cases. First to test initialise, shutdown Ecore_File module and second to test all file operation functions defined in the module.

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1600
2014-10-29 09:01:59 -04:00
Srivardhan Hebbar 2119e34d85 ecore_input: Added test suite for ecore_input.
Summary:
Added test suite for ecore_input with one test case.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1602
2014-10-29 08:39:56 -04:00
Srivardhan Hebbar be5b00cfd1 ecore_con: Added test case to check if _ecore_con_init_count goes below zero.
Summary:
_ecore_con_init_count should not go below zero. I've added a test case to test this and also the code to fix this.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1603
2014-10-29 08:24:53 -04:00
vivek f59ddff4e2 ecore-fb: Adding test suite for ecore_fb
Summary:
Added test suite for ecore_fb with test for ecore_fb_init
w
Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1594
2014-10-29 08:14:26 -04:00
Tom Hacohen 805db9c9ed Eo composite objs: Add a test for the recent comp obj fix.
This adds a fragile test for cedric's fix from commit
3550c38080.

It assumes that all the added 64 functions are in order and that each
eo_op chain is 32 in length. As long as those don't change, this should
be a decent test.
2014-10-28 16:19:30 +00:00
Srivardhan Hebbar 4e72266dce ecore_wayland: Checking if default wayland socket exists before executing test case.
Summary:
If WAYLAND_DISPLAY is not set or if wayland-0 fd doesn't exist in the XDG_RUNTIME_DIR path, then this test case fails. That should not be the case. So made changes in the test case.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1590
2014-10-28 10:27:31 -04:00
Srivardhan Hebbar 17d0b98971 ecore_drm: Added test case calling ecore_drm_shutdown before calling ecore_drm_init.
Summary:
_ecore_drm_init_count should not go below zero. So added test case to verify that.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1589
2014-10-28 10:26:39 -04:00
Srivardhan Hebbar f8ea40f082 ecore_wayland: Added test case calling ecore_wl_shutdown before calling ecore_wl_init.
Summary:
Added a test case to calling ecore_wl_shutdown before ecore_wl_init. The return value of ecore_wl_shutdown should not go below 0.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1584
2014-10-27 08:09:43 -04:00
Srivardhan Hebbar 664c8f7ae4 ecore_drm: Adding test-suite to ecore_drm.
Summary:
Adding test-suite to ecore_drm with one test case.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1583
2014-10-27 08:03:33 -04:00
Felipe Magno de Almeida 7acdf2b1dd [cxx] Fixed eina::value get for string
The get function for string in eina::value wronfully was freeing the
string returned from eina_value_get. Which crashed applications that
used it.
2014-10-23 17:39:12 -02:00