From 8fd1656898c26f547bb76ef86da2827e447ecb3b Mon Sep 17 00:00:00 2001 From: Felipe Magno de Almeida Date: Mon, 23 May 2016 12:33:37 -0300 Subject: [PATCH] eolian-cxx: Add test for list and array complex types --- src/Makefile_Eolian_Cxx.am | 11 ++++++++++- src/tests/eolian_cxx/complex.c | 8 ++++++++ src/tests/eolian_cxx/complex.eo | 15 +++++++++++++++ src/tests/eolian_cxx/complex_cxx.cc | 5 +++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 src/tests/eolian_cxx/complex.c create mode 100644 src/tests/eolian_cxx/complex.eo create mode 100644 src/tests/eolian_cxx/complex_cxx.cc diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index 98aa5e3022..a88df99808 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -78,6 +78,8 @@ tests/eolian_cxx/name_name_cxx.cc \ tests/eolian_cxx/generic.c \ tests/eolian_cxx/eolian_cxx_test_inheritance.cc \ tests/eolian_cxx/eolian_cxx_test_generate.cc \ +tests/eolian_cxx/complex.c \ +tests/eolian_cxx/complex_cxx.cc \ tests/eolian_cxx/eolian_cxx_suite.h tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-eolian_cxx_test_wrapper.$(OBJEXT): tests/eolian_cxx/callback.eo.hh tests/eolian_cxx/callback.eo.h @@ -97,6 +99,9 @@ tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-d.$(OBJEXT): tests/eolian_cxx tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name.$(OBJEXT): tests/eolian_cxx/name_name.eo.c tests/eolian_cxx/name_name.eo.h tests/eolian_cxx/ns_name.eo.c tests/eolian_cxx/ns_name.eo.h tests/eolian_cxx/ns_name_other.eo.c tests/eolian_cxx/ns_name_other.eo.h tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name_cxx.$(OBJEXT): tests/eolian_cxx/name_name.eo.h tests/eolian_cxx/name_name.eo.hh tests/eolian_cxx/ns_name.eo.h tests/eolian_cxx/ns_name.eo.hh tests/eolian_cxx/ns_name_other.eo.h tests/eolian_cxx/ns_name_other.eo.hh +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-complex.$(OBJEXT): tests/eolian_cxx/complex.eo.c tests/eolian_cxx/complex.eo.h +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-complex_cxx.$(OBJEXT): tests/eolian_cxx/complex.eo.h tests/eolian_cxx/complex.eo.hh + CLEANFILES += \ tests/eolian_cxx/callback.eo.hh \ tests/eolian_cxx/callback.eo.c \ @@ -125,7 +130,11 @@ tests/eolian_cxx/ns_name.eo.impl.hh \ tests/eolian_cxx/ns_name_other.eo.hh \ tests/eolian_cxx/ns_name_other.eo.c \ tests/eolian_cxx/ns_name_other.eo.h \ -tests/eolian_cxx/ns_name_other.eo.impl.hh +tests/eolian_cxx/ns_name_other.eo.impl.hh \ +tests/eolian_cxx/complex.eo.hh \ +tests/eolian_cxx/complex.eo.c \ +tests/eolian_cxx/complex.eo.h \ +tests/eolian_cxx/complex.eo.impl.hh tests_eolian_cxx_eolian_cxx_suite_CXXFLAGS = \ diff --git a/src/tests/eolian_cxx/complex.c b/src/tests/eolian_cxx/complex.c new file mode 100644 index 0000000000..a61072bdc1 --- /dev/null +++ b/src/tests/eolian_cxx/complex.c @@ -0,0 +1,8 @@ + +#include + +struct Complex_Data {}; +typedef struct Complex_Data Complex_Data; + +#include "complex.eo.h" +#include "complex.eo.c" diff --git a/src/tests/eolian_cxx/complex.eo b/src/tests/eolian_cxx/complex.eo new file mode 100644 index 0000000000..6e71527199 --- /dev/null +++ b/src/tests/eolian_cxx/complex.eo @@ -0,0 +1,15 @@ +class Complex (Eo.Base) +{ + data: Complex_Data; + methods { + foo { + params { + l: list; + } + } + bar { + return: array; + } + } +} + diff --git a/src/tests/eolian_cxx/complex_cxx.cc b/src/tests/eolian_cxx/complex_cxx.cc new file mode 100644 index 0000000000..60b76c4337 --- /dev/null +++ b/src/tests/eolian_cxx/complex_cxx.cc @@ -0,0 +1,5 @@ + +#include + +#include "complex.eo.h" +#include "complex.eo.hh"