Commit Graph

274 Commits

Author SHA1 Message Date
Tom Hacohen 92cc33c46f Eo: EO_BASE_CLASS->EO_CLASS. 2014-04-10 04:20:21 +01:00
Tom Hacohen 374af9b9ca Eo: eo_base's data_*->key_data_*. 2014-04-10 04:20:21 +01:00
Tom Hacohen c32bb4fe95 Eo2: Updated naming Eo2->Eo. 2014-04-10 04:20:21 +01:00
Jérémy Zurcher 4b9c37501c eo2: add tests for thread safe call stack
Summary:
   2 threads run 'eo2_do(o, a(), b());'
   - A goes first, creates an object, enters 'eo2_do(o, a(), b());'
     in a() call, it blocks, releases B and waits for it.
   - B when released, creates an object, enters 'eo2_do(o, a(), b());'
     in a() call, it joins and releases A, then blocks.
   - A returns from a(); and enters b() using current call stack frame,
     which is the one pushed by B! then pop the frame and releases B.
   - B does as above using the stack pushed by A!
2014-04-10 04:20:21 +01:00
Jérémy Zurcher 64aa007caf eo2: update class creation tests, follow new error policy
see previous commit
2014-04-10 04:20:21 +01:00
Jérémy Zurcher 2fb5a54610 eo2: add tests for method call error msgs 2014-04-10 04:20:20 +01:00
Jérémy Zurcher d23b9ffd23 eo2: tests: extract mgs checks into eo_error_msgs.c|h 2014-04-10 04:20:20 +01:00
Jérémy Zurcher 5dc95bb50c eo2: add test cases for class construction errors
it covers: NULL API func, overriding non-existing fct,
API redefined, dich func override.
2014-04-10 04:20:20 +01:00
Jérémy Zurcher 914dde776f eo2: fix uninitialized vars in tests
because of conditional execution of eo2_do() fct calls
these vars could end up not initialized.
2014-04-10 04:20:20 +01:00
Jérémy Zurcher d497459f93 eo2: add tests for call stack grow and shrink 2014-04-10 04:20:20 +01:00
Tom Hacohen 055dd3c521 eo2: change the order of EO2_OP_FUNC* to put EAPI first.
This looks cleaner and more aligned. Also, it makes more sense as the
internal function is bound to the EAPI and not the other way around.
2014-04-10 04:20:20 +01:00
Tom Hacohen ebae305a9e eo2: fixed validity checks for eo2_do_super.
The class should be checked to be valid and non-null.
This fixes the issues with eo_suite.
2014-04-10 04:20:19 +01:00
Tom Hacohen c20c537528 eo2: use EO2_CLASS_DESCRIPTION_NOOPS everywhere. 2014-04-10 04:20:19 +01:00
Tom Hacohen ed14382f7c eo2: fixed a compliation issue in test suite. 2014-04-10 04:20:19 +01:00
Tom Hacohen 7d79b10bb6 eo2 suite: add an important FIXME. 2014-04-10 04:20:19 +01:00
Tom Hacohen 08b28211b6 eo2: migrated the eo-suite test to eo2. 2014-04-10 04:20:19 +01:00
Tom Hacohen 2593cb86c6 eo2: interface test, removed obsolete Eo_Op. 2014-04-10 04:20:19 +01:00
Tom Hacohen f4f62e0f9f eo2: migrated mixin test to eo2. 2014-04-10 04:20:19 +01:00
Tom Hacohen e4f0e4c410 eo2: constructors test, removed obsolete Eo_Op. 2014-04-10 04:20:19 +01:00
Tom Hacohen 13b30abe56 eo2: cleaned up the function overrides test. 2014-04-10 04:20:19 +01:00
Tom Hacohen 3a524e4201 eo2: fix function overrides test. 2014-04-10 04:20:19 +01:00
Jérémy Zurcher b8e9b14699 eo2: fix some op descriptions in constructors tests 2014-04-10 04:20:18 +01:00
Jérémy Zurcher 78973fba6c eo2: fix tests, do not use _CLASS_FUNC_, see previous commit 2014-04-10 04:20:18 +01:00
Tom Hacohen 9a9fdb46fe eo2 test composite: migrated things I forgot to migrate. 2014-04-10 04:20:18 +01:00
Tom Hacohen 18698086b4 eo2: migrated signals test to eo2. 2014-04-10 04:20:18 +01:00
Tom Hacohen 760a74a150 eo2: migrated interface test to eo2. 2014-04-10 04:20:18 +01:00
Tom Hacohen 0ee8b33bf7 eo2: migrated function_overrides test to eo2. 2014-04-10 04:20:18 +01:00
Tom Hacohen cbc9a7bd30 eo2: migrated constructors test to eo2. 2014-04-10 04:20:18 +01:00
Tom Hacohen e5c7d666e0 eo2: migrated the composite test to eo2. 2014-04-10 04:20:18 +01:00
Tom Hacohen 7c0598c930 eo2: access tests makeup 2014-04-10 04:20:18 +01:00
Tom Hacohen ac2f6d0bf5 eo2: updated the access test to use eo2. 2014-04-10 04:20:17 +01:00
Jérémy Zurcher ef09ef7489 eo: replace composite_objects Eina_List with an array of Eo_Object*
as we don't support multiple composites of the same class,
and know at class elaboration how many composites we should have,
we can create the composites array and pack it at the end of the object.
2014-03-05 23:57:39 +01:00
Jérémy Zurcher c7922f92bc eo: revert 13502a1 and 7821df1
I'm running out of time, will look at it later
2014-02-27 15:02:45 +01:00
Jérémy Zurcher 13502a159c eo: add tests for eo_composite_detach 2014-02-26 16:25:00 +01:00
Jérémy Zurcher e199230615 eo: eo_composite_attach check composite class, disallow duplicates
eo_composite_attach fail if the class of the composite is not
listed in the parent class extensions, or if there is already a
composite of the same class. The later because calls are
forwarded to the first responding composite, see _eo_op_internal().
2014-02-26 16:25:00 +01:00
Tom Hacohen d6ac2464bb Eo: Make eo_manual_free() return a success flag.
eo_manual_free() can fail in some cases, and it is useful for users of
this API to know about it in order to decide what to do.
2013-11-26 12:10:53 +00:00
Tom Hacohen 46a3f01465 Eo tests: Added a parent_set parameter validity test. 2013-11-20 12:23:18 +00:00
Jérémy Zurcher 9e246eadd0 eo: cover eo_class_get new behaviour 2013-10-13 00:00:13 +02:00
Daniel Zaoui 203b6295e9 Reduce the number of deleted objects to reduce the number of expected error prints 2013-09-29 09:34:03 +03:00
Tom Hacohen e6886e05b1 Eo: get rid of eo_class_do(_super) which we don't need anymore.
We now completely use eo_do(_super), so those are not needed.
2013-09-27 17:01:51 +01:00
Tom Hacohen c1e5fb7cf8 Eo tests: Fixed wrong prototype in one of the tests in the suite. 2013-09-27 16:44:00 +01:00
Tom Hacohen 682c69764d Revert "eo: libs,test,benchmarks Eo_Class -> Eo"
This reverts commit 1714fe93f4.

We actually want this type, it makes things clearer.

Conflicts:
	src/tests/eo/function_overrides/function_overrides_inherit2.c
	src/tests/eo/function_overrides/function_overrides_simple.c
	src/tests/eo/suite/eo_test_class_simple.c
2013-09-27 16:40:32 +01:00
Tom Hacohen 2a82ff95e4 Eo: unify the class func and normal func prototypes.
Conflicts:
	src/lib/eo/eo.c
2013-09-27 14:01:47 +01:00
Jérémy Zurcher 1714fe93f4 eo: libs,test,benchmarks Eo_Class -> Eo
Conflicts:
	src/tests/eo/suite/eo_test_general.c
2013-09-27 14:01:46 +01:00
Cedric Bail 5b7063b62a eo: fix those anoying check. 2013-09-25 15:29:19 +09:00
Jérémy Zurcher 4eb2fb0bb6 eo_class_new: pack mro at the end of _Eo_Class 2013-06-17 23:41:02 +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
Jérémy Zurcher f71b40db2f eo ptr ind tests: guard numerous fail_if, lesson learned from eina_list_shuffle 2013-05-07 23:40:53 +02:00
Jérémy Zurcher fc34b73c28 eo ptr ind: eo_test_general, increase NB_OBJS to cover more 2013-05-07 00:35:07 +02:00
Jérémy Zurcher 94845627b5 Revert "eo suite: add ptr indirection coverage test"
This reverts commit 88cf0cf460.
already covered in eo_test_general.c
2013-05-07 00:03:59 +02:00
Jérémy Zurcher 88cf0cf460 eo suite: add ptr indirection coverage test 2013-05-03 21:13:03 +02:00
Daniel Zaoui f6a37f88d2 Eo: Add reference functions for objects data
We want to introduce a new mechanism concerning the data of the Eo
objects.
The goal is to improve the memory management by defragmenting the memory
banks used by the Eo objects. The first phase has been done by raster
and consists in allocating the objects into a separate memory region
that the one used by malloc. So now, we know where our objects are
located.
Now, moving objects means moving data of objects. The issue we have here
is that a lot of data pointers are stored into data of other objects,
e.g Evas Object data into lists for rendering...
We need a way to reference the data and eo_data_get doesn't provide us
that. So we need to improve the API for data extraction by requesting
from the developer if the data will be stored or not. Five functions are
supplied:
- eo_data_scope_get: no referencing, the data pointer is no more used after
exiting the function.
- eo_data_ref: reference the data of the object. It means that while the
data is referenced, the object cannot be moved.
- eo_data_xref: reference the data of the object but for debug purpose,
we associate the objects that references. Same behavior as eo_data_ref
for non-debug.
- eo_data_unref: unreference the data of an object.
- eo_data_xunref: unreference the data of an object previously
referenced by another object.

I deprecated the eo_data_get function. Most of the time,
eo_data_scope_get needs to be used.

In the next patches, I changed the eo_data_get to the corresponding
functions, according to the usage of the data pointer.

The next step is to find all the places in the code where the data is
stored but not yet referenced. This will be done by:
- requesting from every object to unreference all data to other objects.
- moving all the objects from one region to another
- requesting from every object to rerefenrence the data.
- debugging by hunting the segmentation faults and other weird
creatures.
2013-05-01 10:37:08 +03:00
Tom Hacohen fc05066a50 Eo: fixed an issue with the test_value test. 2013-04-24 17:42:24 +01:00
Tom Hacohen a26ed054a9 Eo: Added test to the special eina value type. 2013-04-24 16:45:41 +01:00
Daniel Zaoui d29fc36e1b Eo: tests to check eo ptrs indirection feature.
The test doesn't fail if the feature is disabled.
2013-04-23 09:50:40 +03:00
Tom Hacohen 0ed15b04f8 Eo array: Add more testing. 2013-04-12 13:49:26 +01:00
Tom Hacohen 3e11c380c9 Eo: Added eo_event_callback_array_* functions.
These functions let you pass an array of callbacks instead of just one.
It's more memory efficient to use this if you just add a bulk of events
on the same object.

This commits breaks ABI, and breaks API of the EO_EV_CALLBACK_ADD/DEL
signals (the event info passed).
2013-04-12 12:02:49 +01:00
Daniel Willmann fe8db5a2d1 eo: Update tests to check for the correct error strings
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-09 14:13:47 +01:00
Tom Hacohen a170683334 Change usage of eo_do_super to the new prototype. 2013-03-18 16:14:18 +00:00
Tom Hacohen 83180acf26 Eo: Added cur_klass as a parameter to eo_*_do_super.
We now need to pass the current class to eo_do_super. This is faster and
more memory efficient and generally lets us do things better.

Using the eo_benchmarks we get ~20% speed-up.
2013-03-18 16:14:18 +00:00
Tom Hacohen 3ba9311c0f Tests: Output XML to build dir, not source dir. 2013-03-12 12:46:06 +00:00
Stefan Schmidt 85810dac8c tests: Add xml output file for check runs for the use with jenkins.
We can do pretty graphs with jenkins about our unit tests. But we
need the check xml output for that. Enabling it in all suites.
2013-03-12 09:59:06 +00:00
Tom Hacohen 7ccdb921ad Eo tests: when comparing logs, ignore anything below warnings.
Comparing all the debug messages is kinda crazy, so we just don't bother.
2013-03-01 12:08:19 +00:00
Tom Hacohen f9cf5bb374 Eo tests: Beginning of test output cleanup.
SVN revision: 83635
2013-02-05 14:37:28 +00:00
Tom Hacohen 21a6a84667 Eo: Changed NDEBUG to EO_DEBUG.
This was stupid from the start, but now it casuse even more issues.
We'll have to just add a configure option to it when the time comes.

SVN revision: 82989
2013-01-18 16:57:57 +00:00
Tom Hacohen 37efa5efd7 Eo tests: Fix function overrides test to not test some things when NDEBUG is used.
SVN revision: 82987
2013-01-18 16:13:30 +00:00
Tom Hacohen f5af9566d0 Eo tests: fix warnings.
SVN revision: 82828
2013-01-15 17:17:39 +00:00
Gustavo Sverzut Barbieri 733425c62c efl: make libraries aware of EFL_RUN_IN_TREE.
this variable tells that the build is being done in tree and we should
not look at install locations.



SVN revision: 82217
2013-01-04 17:19:43 +00:00
Vincent Torri 4ae8b8cf86 merge: do not use recursive make for unit tests
SVN revision: 79413
2012-11-18 07:12:38 +00:00
Tom Hacohen 0bf81a35f0 Efl eo: "Fixed" eo tests.
It doesn't affect proto/eobj so no need to do it there too.
There are things we only test if NDEBUG is not passed to Eo. Eo itself was
compiled with NDEBUG but the tests were not notified about it so those tests
failed.
Many thanks to Vincent and Stefan for bugging me about it non-stop, without
you guys, I may never have gotten to it.

SVN revision: 79059
2012-11-09 19:23:21 +00:00
Tom Hacohen a70076f094 Eo: Fixed compilation warning.
SVN revision: 78366
2012-10-23 10:01:50 +00:00
Vincent Torri 77d90bd45e merge: pass directly to the preprocessor the Windows macro instead of using autotools
SVN revision: 78350
2012-10-23 05:43:57 +00:00
Vincent Torri 7fe3d35994 merge: __UNUSED__ --> EINA_UNUSED and some fixes in eo.
SVN revision: 77542
2012-10-05 20:09:47 +00:00
Vincent Torri 3b5a3448b7 merge: add eo
SVN revision: 77072
2012-09-26 06:56:52 +00:00