Commit Graph

16 Commits

Author SHA1 Message Date
Vitor Sousa b1e44484a5 cxx: remove compilation warnings in C++ code, from both gcc and clang
Summary:
Remove almost all the compilation warnings from C++ code. Only explicit
warnings using the `#warning` preprocessor directive remain.

Some warnings had to be suppressed with `#pragma` directives because the
behavior they were warning about is intended in some specific places.
Code comments were added in such situations.

Added a generator that creates `#pragma` directives in order to suppress
warnings in all generated C++ headers.
Currently `-Wignored-qualifiers` is the only warning category being suppressed.
The innocuous const qualifiers that it points are inoffensive and have
no effect in compilation at all.
They are also hard to track in generation since they can emerge from different
types in many places.

To ease the generation of the warning suppressors an utility constructor was
added to `efl::eolian::grammar::attributes::unused_type`.

Add constructors to `eolian_mono::class_context` to default initialize its
internal string and avoid field initialization warnings.

Test Plan: `meson test`

Reviewers: lauromoura, felipealmeida, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D9275
2019-07-12 09:07:27 -04:00
Mike Blumenkrantz 7c7998b3dc meson: enforce 61s timeout for tests, remove explicit timeouts from build files
unit tests automatically abort with info after 60s, and tests should be run with
an appropriate timeout to avoid conflict with the test runner's default 30s timeout

set explicit timeout in eio test for now because there's still frequent bugs here

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8894
2019-05-15 18:49:51 +02:00
Marcel Hollerbach e85311c992 meson: here comes cxx bindings
this commits is bringing cxx bindings.
You can enable / disable them with the cxx option.

Differential Revision: https://phab.enlightenment.org/D7181
2018-10-24 12:05:58 +02:00
Marcel Hollerbach 52e0b8440b Revert "meson: add cxx bindings"
This reverts commit 5aaf2cbb5d.

The cxx bindings were accidently merged. Things are missing (like .eot.h
files)
2018-10-18 16:12:13 +02:00
Marcel Hollerbach 5aaf2cbb5d meson: add cxx bindings
this commit adds cxx bindings to meson.

Differential Revision: https://phab.enlightenment.org/D7169
2018-10-18 16:01:07 +02:00
Lauro Moura cd20ca85f4 tests: Use EFL_START/END_TEST in cxx tests
Summary: Will enable timing info in these tests.

Test Plan: run make check

Reviewers: zmike, felipealmeida, devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6359
2018-06-22 12:43:47 -04:00
Mike Blumenkrantz 978901903d tests: move bindings tests to using checked fixtures too.
T6862
T6811

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-04-05 10:19:57 -07: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
Stefan Schmidt 6bc1dc6d83 cxx: follow EINA_ERROR_OUT_OF_MEMORY deprecation
Follow the rest of efl and use ENOMEM from now on. This avoids ugly deprecation
warnings.
2016-09-05 10:39:24 +02:00
Stefan Schmidt 8992c2aeae tests cxx: remove superfluous output to stdout
These outputs are not giving any more information besides what we already get:

Ecore C++ headers compilePASS: tests/ecore_cxx/cxx_compile_test

(Ignoring the problem with the newline) The test name tells it all and we are
just filling the log.
2016-03-02 15:32:09 +01:00
Vincent Torri 563f616b7c Test rework #3: Ecore_Cxx 2016-02-16 12:41:06 +00:00
michelle legrand b71229ac47 check: fix tests suites on Windows
Disable timeout because we cannot fork on Windows.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-30 10:49:54 +01:00
Savio Sena 34c3d4ded7 tests: Added config.h to tests. 2014-07-18 18:55:56 -03:00
Savio Sena 46b6e8a563 eolian_cxx: initial version of the EFL C++ Bindings Generator.
Summary:
This patch adds 'eolian_cxx' -- a C++ bindings generator --
to the EFL tree. Eolian Cxx uses Eolian API to read .eo files and generate
.eo.hh. It relies/depends on Eo Cxx and Eina Cxx (both non-generated
bindings).

src/bin/eolian_cxx: The eolian_cxx program.
src/lib/eolian_cxx: A header-only library that implements the C++ code
generation that binds the .eo classes.

=Examples=

src/examples/eolian_cxx/eolian_cxx_simple_01.cc: The simplest example,
it just uses some "dummy" generated C++ classes.

src/examples/eolian_cxx/eolian_cxx_inherit_01.cc: Illustrates how
pure C++ classes inherit from .eo generated classes.

src/examples/evas/evas_cxx_rectangle.cc: More realistic example using
the generated bindings Evas Cxx. Still a bit shallow because we don't
have full fledged .eo descriptions yet, but will be improved.

=Important=

The generated code is not supported and not a stable API/ABI. It is
here to gather people interest and get review before we set things in
stone for release 1.11.

@feature

Reviewers: cedric, smohanty, raster, stefan_schmidt

CC: felipealmeida, JackDanielZ, cedric, stefan

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-03 00:56:32 +02:00
Felipe Magno de Almeida 4105c002b3 ecore-cxx: add support for exceptions.
Summary:
Added support for exceptions on ecore_main_loop_thread_safe_call_async and
ecore_main_loop_thread_safe_call_sync. Also optimized the transport of the
return value through a parameter on ecore_main_loop_thread_safe_call_sync.

ecore-cxx: Changed uses of alignas for aligned_storage in C++11

Reviewers: cedric, raster

CC: savio, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-03-07 14:37:03 +09:00
Felipe Magno de Almeida 91f5a9b043 ecore_cxx: add main_loop_thread_safe_call_sync and main_loop_thread_safe_call_async with tests
The point of this binding is to enable the support for easy lambda for ecore function
that wont be using Eo. See the tests on how to use those.

Reviewers: cedric, raster

CC: savio, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-02-26 18:52:08 -03:00