efl/src/tests/elementary/spec
Mike Blumenkrantz e0cf299ae5 tests: resolve float comparison warnings
Summary: Depends on D11788

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11789
2020-05-09 09:25:14 +01:00
..
README Efl.Ui.Format revamp 2019-07-04 19:38:20 +02:00
efl_test_basics.c tests_: elementary: free memory in error path 2020-03-03 10:55:40 +01:00
efl_test_clickable.c efl_ui_item: use signals from the theme and not object 2019-12-20 10:33:38 -08:00
efl_test_container.c introduce group item 2019-08-21 07:50:46 +02:00
efl_test_content.c efl_content: equip the tests with more lifetime checks 2019-12-19 11:46:26 -08:00
efl_test_format.c efl_ui_format: make this usable with the standard behaviour of accessors 2019-12-18 21:45:45 +01:00
efl_test_gfx_arrangement.c tests: resolve float comparison warnings 2020-05-09 09:25:14 +01:00
efl_test_gfx_view.c Efl.Ui.Animation_View : Change class name to Efl.Ui.Vg_Animation 2019-12-31 09:53:16 -05:00
efl_test_multi_selectable.c efl_ui_multi_selectable: clean this up 2019-11-25 13:31:24 +01:00
efl_test_pack.c efl_ui_relative_container: rename relative_layout 2019-11-12 14:33:13 +01:00
efl_test_pack_linear.c tests/spec: pre-create a ton of widgets during test init 2019-10-31 09:02:56 -04:00
efl_test_range_display.c tests: resolve float comparison warnings 2020-05-09 09:25:14 +01:00
efl_test_range_interactive.c tests: resolve float comparison warnings 2020-05-09 09:25:14 +01:00
efl_test_selectable.c efl_ui_selectable: add spec test suite for this 2019-08-08 09:12:46 -04:00
efl_test_single_selectable.c efl_ui_*selectable: unify these APIs with the same c_prefix 2019-09-26 18:32:58 +09:00
efl_test_ui_view.c elementary: add a test for Efl.Ui.View interface. 2019-07-17 21:58:01 +02:00
efl_ui_spec_suite.c efl: correct class description name of simple class 2020-01-17 14:03:25 +01:00
efl_ui_spec_suite.h tests/spec: pre-create a ton of widgets during test init 2019-10-31 09:02:56 -04:00
generator.py tests/spec: use wrefs to automatically unset global pointers 2019-10-31 09:02:52 -04:00
meson.build tests/spec: allow for a longer timeout of the spec suite for dist build 2019-11-05 16:49:26 +01:00

README

== What is this spec test suite for ? ==

The spec test suite tests code purely against interfaces. There is no specific widget code in the tests; only interface calls are tested.
This is useful for testing the same interface on different implementations.

== Test metadata ==

The test framework is driven by some metadata found at the top of every test file.
There is a C comment at the top of every test file that starts with "spec-meta-start", followed by a json snippet. For instance:
/* spec-meta-start
   {"test-interface":"Efl.Pack_Linear",
    "test-widgets": ["Efl.Ui.Box", "Efl.Ui.Grid"],
    "custom-mapping" : {
       "Efl.Ui.Grid" : "EFL_UI_GRID_DEFAULT_ITEM_CLASS"
    }
   }
   spec-meta-end */

The "test-interface" key specifies the interface being tested.
The "test-widgets" key specifies the widgets where this interface will be tested.
"custom-mapping" is an optional key. Some interface methods might require that an object of a specific type is passed as parameter. With "custom-mapping" you can specify the types of these objects for each widget. The above example instructs the test framework to inject objects of type EFL_UI_GRID_DEFAULT_ITEM_CLASS when testing methods of the Efl.Ui.Grid widget that require an object.

== Adding a widget to a test ==

Just add your widget name to the "test-widgets" array and recompile. Next run of the spec test suite will check if your widget follows the spec of this interface.

== Adding a new test ==

To add a new test you need to create the .c file and include the metadata comment at the top.
Remember to add the new .c file to the meson.build file.