summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-12-21 20:31:39 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-12-21 22:24:47 +0100
commit87a93b852134d8b348d5c3615471e8713748966a (patch)
treeb5c71b682e8b16721d0c755614952a0a813d4661
parent6b70cd5f971579f09a153e513bde7f4b823785d8 (diff)
eolian: unify test directories
-rw-r--r--src/Makefile_Eolian.am3
-rw-r--r--src/tests/eolian/eolian_generation.c84
-rw-r--r--src/tests/eolian/eolian_parsing.c88
3 files changed, 87 insertions, 88 deletions
diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am
index efad6a62d4..cd3f824171 100644
--- a/src/Makefile_Eolian.am
+++ b/src/Makefile_Eolian.am
@@ -124,8 +124,7 @@ CLEANFILES += tests/eolian/generated_future.eo.h tests/eolian/generated_future.e
124 124
125tests_eolian_eolian_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl -I$(top_builddir)/src/tests/eolian \ 125tests_eolian_eolian_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl -I$(top_builddir)/src/tests/eolian \
126-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eolian\" \ 126-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eolian\" \
127-DPACKAGE_DATA_DIR=\"$(top_srcdir)/src/tests/eolian\" \ 127-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eolian\" \
128-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
129-DEOLIAN_GEN="\"$(EOLIAN_GEN)\"" \ 128-DEOLIAN_GEN="\"$(EOLIAN_GEN)\"" \
130@CHECK_CFLAGS@ \ 129@CHECK_CFLAGS@ \
131@EOLIAN_CFLAGS@ @EO_CFLAGS@ 130@EOLIAN_CFLAGS@ @EO_CFLAGS@
diff --git a/src/tests/eolian/eolian_generation.c b/src/tests/eolian/eolian_generation.c
index eb9f7d3973..785d73d434 100644
--- a/src/tests/eolian/eolian_generation.c
+++ b/src/tests/eolian/eolian_generation.c
@@ -85,7 +85,7 @@ _eolian_gen_execute(const char *eo_filename, const char *options, const char *ou
85{ 85{
86 char command[PATH_MAX]; 86 char command[PATH_MAX];
87 snprintf(command, PATH_MAX, 87 snprintf(command, PATH_MAX,
88 EOLIAN_GEN" %s -S -I \""PACKAGE_DATA_DIR"/data\" -o %s %s", 88 EOLIAN_GEN" %s -S -I \""TESTS_SRC_DIR"/data\" -o %s %s",
89 options, output_filename, eo_filename); 89 options, output_filename, eo_filename);
90 return system(command); 90 return system(command);
91} 91}
@@ -96,13 +96,13 @@ START_TEST(eolian_dev_impl_code)
96 snprintf(output_filepath, PATH_MAX, "%s/eolian_object_impl", 96 snprintf(output_filepath, PATH_MAX, "%s/eolian_object_impl",
97 eina_environment_tmp_get()); 97 eina_environment_tmp_get());
98 _remove_ref(output_filepath, "c"); 98 _remove_ref(output_filepath, "c");
99 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "-gi", output_filepath)); 99 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/object_impl.eo", "-gi", output_filepath));
100 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_ref.c", output_filepath, "c")); 100 fail_if(!_files_compare(TESTS_SRC_DIR"/data/object_impl_ref.c", output_filepath, "c"));
101 /* Check that nothing is added */ 101 /* Check that nothing is added */
102 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "-gi", output_filepath)); 102 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/object_impl.eo", "-gi", output_filepath));
103 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_ref.c", output_filepath, "c")); 103 fail_if(!_files_compare(TESTS_SRC_DIR"/data/object_impl_ref.c", output_filepath, "c"));
104 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl_add.eo", "-gi", output_filepath)); 104 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/object_impl_add.eo", "-gi", output_filepath));
105 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_add_ref.c", output_filepath, "c")); 105 fail_if(!_files_compare(TESTS_SRC_DIR"/data/object_impl_add_ref.c", output_filepath, "c"));
106} 106}
107END_TEST 107END_TEST
108 108
@@ -113,15 +113,15 @@ START_TEST(eolian_types_generation)
113 eina_environment_tmp_get()); 113 eina_environment_tmp_get());
114 _remove_ref(output_filepath, "eo.h"); 114 _remove_ref(output_filepath, "eo.h");
115 _remove_ref(output_filepath, "eo.stub.h"); 115 _remove_ref(output_filepath, "eo.stub.h");
116 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/typedef.eo", "-gh", output_filepath)); 116 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/typedef.eo", "-gh", output_filepath));
117 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/typedef_ref.h", output_filepath, "eo.h")); 117 fail_if(!_files_compare(TESTS_SRC_DIR"/data/typedef_ref.h", output_filepath, "eo.h"));
118 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/struct.eo", "-gh", output_filepath)); 118 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/struct.eo", "-gh", output_filepath));
119 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/struct_ref.h", output_filepath, "eo.h")); 119 fail_if(!_files_compare(TESTS_SRC_DIR"/data/struct_ref.h", output_filepath, "eo.h"));
120 120
121 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/typedef.eo", "-gs", output_filepath)); 121 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/typedef.eo", "-gs", output_filepath));
122 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/typedef_ref_stub.h", output_filepath, "eo.stub.h")); 122 fail_if(!_files_compare(TESTS_SRC_DIR"/data/typedef_ref_stub.h", output_filepath, "eo.stub.h"));
123 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/struct.eo", "-gs", output_filepath)); 123 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/struct.eo", "-gs", output_filepath));
124 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/struct_ref_stub.h", output_filepath, "eo.stub.h")); 124 fail_if(!_files_compare(TESTS_SRC_DIR"/data/struct_ref_stub.h", output_filepath, "eo.stub.h"));
125} 125}
126END_TEST 126END_TEST
127 127
@@ -131,8 +131,8 @@ START_TEST(eolian_default_values_generation)
131 snprintf(output_filepath, PATH_MAX, "%s/eolian_class_simple", 131 snprintf(output_filepath, PATH_MAX, "%s/eolian_class_simple",
132 eina_environment_tmp_get()); 132 eina_environment_tmp_get());
133 _remove_ref(output_filepath, "eo.c"); 133 _remove_ref(output_filepath, "eo.c");
134 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "-gc", output_filepath)); 134 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gc", output_filepath));
135 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref.c", output_filepath, "eo.c")); 135 fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref.c", output_filepath, "eo.c"));
136} 136}
137END_TEST 137END_TEST
138 138
@@ -142,8 +142,8 @@ START_TEST(eolian_override_generation)
142 snprintf(output_filepath, PATH_MAX, "%s/eolian_override", 142 snprintf(output_filepath, PATH_MAX, "%s/eolian_override",
143 eina_environment_tmp_get()); 143 eina_environment_tmp_get());
144 _remove_ref(output_filepath, "eo.c"); 144 _remove_ref(output_filepath, "eo.c");
145 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/override.eo", "-gc", output_filepath)); 145 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/override.eo", "-gc", output_filepath));
146 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/override_ref.c", output_filepath, "eo.c")); 146 fail_if(!_files_compare(TESTS_SRC_DIR"/data/override_ref.c", output_filepath, "eo.c"));
147} 147}
148END_TEST 148END_TEST
149 149
@@ -153,11 +153,11 @@ START_TEST(eolian_functions_descriptions)
153 snprintf(output_filepath, PATH_MAX, "%s/eolian_class_simple", 153 snprintf(output_filepath, PATH_MAX, "%s/eolian_class_simple",
154 eina_environment_tmp_get()); 154 eina_environment_tmp_get());
155 _remove_ref(output_filepath, "eo.h"); 155 _remove_ref(output_filepath, "eo.h");
156 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "-gh", output_filepath)); 156 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gh", output_filepath));
157 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref_eo.h", output_filepath, "eo.h")); 157 fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_eo.h", output_filepath, "eo.h"));
158 _remove_ref(output_filepath, "eo.legacy.h"); 158 _remove_ref(output_filepath, "eo.legacy.h");
159 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "-gl", output_filepath)); 159 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gl", output_filepath));
160 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref_legacy.h", output_filepath, "eo.legacy.h")); 160 fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_legacy.h", output_filepath, "eo.legacy.h"));
161} 161}
162END_TEST 162END_TEST
163 163
@@ -167,8 +167,8 @@ START_TEST(eolian_import)
167 snprintf(output_filepath, PATH_MAX, "%s/eolian_import_types", 167 snprintf(output_filepath, PATH_MAX, "%s/eolian_import_types",
168 eina_environment_tmp_get()); 168 eina_environment_tmp_get());
169 _remove_ref(output_filepath, "eot.h"); 169 _remove_ref(output_filepath, "eot.h");
170 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/import_types.eot", "-gh", output_filepath)); 170 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/import_types.eot", "-gh", output_filepath));
171 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/import_types_ref.h", output_filepath, "eot.h")); 171 fail_if(!_files_compare(TESTS_SRC_DIR"/data/import_types_ref.h", output_filepath, "eot.h"));
172} 172}
173END_TEST 173END_TEST
174 174
@@ -178,11 +178,11 @@ START_TEST(eolian_docs)
178 snprintf(output_filepath, PATH_MAX, "%s/eolian_docs", 178 snprintf(output_filepath, PATH_MAX, "%s/eolian_docs",
179 eina_environment_tmp_get()); 179 eina_environment_tmp_get());
180 _remove_ref(output_filepath, "eo.h"); 180 _remove_ref(output_filepath, "eo.h");
181 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "-gh", output_filepath)); 181 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gh", output_filepath));
182 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/docs_ref.h", output_filepath, "eo.h")); 182 fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref.h", output_filepath, "eo.h"));
183 _remove_ref(output_filepath, "eo.legacy.h"); 183 _remove_ref(output_filepath, "eo.legacy.h");
184 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "-gl", output_filepath)); 184 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gl", output_filepath));
185 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/docs_ref_legacy.h", output_filepath, "eo.legacy.h")); 185 fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref_legacy.h", output_filepath, "eo.legacy.h"));
186} 186}
187END_TEST 187END_TEST
188 188
@@ -194,26 +194,26 @@ START_TEST(eolian_function_pointers)
194 snprintf(output_filepath, PATH_MAX, "%s/eolian_function_pointers", 194 snprintf(output_filepath, PATH_MAX, "%s/eolian_function_pointers",
195 eina_environment_tmp_get()); 195 eina_environment_tmp_get());
196 _remove_ref(output_filepath, "eot.h"); 196 _remove_ref(output_filepath, "eot.h");
197 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/function_types.eot", "-gh", output_filepath)); 197 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/function_types.eot", "-gh", output_filepath));
198 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_types_ref.h", output_filepath, "eot.h")); 198 fail_if(!_files_compare(TESTS_SRC_DIR"/data/function_types_ref.h", output_filepath, "eot.h"));
199 199
200 // .eo.h 200 // .eo.h
201 _remove_ref(output_filepath, "eo.h"); 201 _remove_ref(output_filepath, "eo.h");
202 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/function_as_argument.eo", "-gh", output_filepath)); 202 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/function_as_argument.eo", "-gh", output_filepath));
203 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_as_argument_ref.h", output_filepath, "eo.h")); 203 fail_if(!_files_compare(TESTS_SRC_DIR"/data/function_as_argument_ref.h", output_filepath, "eo.h"));
204 204
205 // .eo.c 205 // .eo.c
206 _remove_ref(output_filepath, "eo.c"); 206 _remove_ref(output_filepath, "eo.c");
207 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/function_as_argument.eo", "-gc", output_filepath)); 207 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/function_as_argument.eo", "-gc", output_filepath));
208 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_as_argument_ref.c", output_filepath, "eo.c")); 208 fail_if(!_files_compare(TESTS_SRC_DIR"/data/function_as_argument_ref.c", output_filepath, "eo.c"));
209 209
210 // .eo.imp.c 210 // .eo.imp.c
211 _remove_ref(output_filepath, "c"); 211 _remove_ref(output_filepath, "c");
212 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/function_as_argument.eo", "-gi", output_filepath)); 212 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/function_as_argument.eo", "-gi", output_filepath));
213 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_as_argument_impl_ref.c", output_filepath, "c")); 213 fail_if(!_files_compare(TESTS_SRC_DIR"/data/function_as_argument_impl_ref.c", output_filepath, "c"));
214 /* Check that nothing is added */ 214 /* Check that nothing is added */
215 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/function_as_argument.eo", "-gi", output_filepath)); 215 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/function_as_argument.eo", "-gi", output_filepath));
216 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_as_argument_impl_ref.c", output_filepath, "c")); 216 fail_if(!_files_compare(TESTS_SRC_DIR"/data/function_as_argument_impl_ref.c", output_filepath, "c"));
217} 217}
218END_TEST 218END_TEST
219 219
@@ -223,8 +223,8 @@ START_TEST(owning)
223 snprintf(output_filepath, PATH_MAX, "%s/eolian_owning", 223 snprintf(output_filepath, PATH_MAX, "%s/eolian_owning",
224 eina_environment_tmp_get()); 224 eina_environment_tmp_get());
225 _remove_ref(output_filepath, "eo.c"); 225 _remove_ref(output_filepath, "eo.c");
226 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/owning.eo", "-gc", output_filepath)); 226 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/owning.eo", "-gc", output_filepath));
227 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/owning.eo.c", output_filepath, "eo.c")); 227 fail_if(!_files_compare(TESTS_SRC_DIR"/data/owning.eo.c", output_filepath, "eo.c"));
228 228
229} 229}
230END_TEST 230END_TEST
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index f1b443049d..8227a568f9 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -25,8 +25,8 @@ START_TEST(eolian_namespaces)
25 eolian_init(); 25 eolian_init();
26 Eolian *eos = eolian_new(); 26 Eolian *eos = eolian_new();
27 /* Parsing */ 27 /* Parsing */
28 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 28 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
29 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/nmsp1_class1.eo"))); 29 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/nmsp1_class1.eo")));
30 30
31 /* Classes existence */ 31 /* Classes existence */
32 fail_if(!(class11 = eolian_class_get_by_name(unit, "nmsp1.class1"))); 32 fail_if(!(class11 = eolian_class_get_by_name(unit, "nmsp1.class1")));
@@ -108,8 +108,8 @@ START_TEST(eolian_events)
108 eolian_init(); 108 eolian_init();
109 Eolian *eos = eolian_new(); 109 Eolian *eos = eolian_new();
110 /* Parsing */ 110 /* Parsing */
111 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 111 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
112 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/events.eo"))); 112 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/events.eo")));
113 113
114 /* Class */ 114 /* Class */
115 fail_if(!(class = eolian_class_get_by_name(unit, "Events"))); 115 fail_if(!(class = eolian_class_get_by_name(unit, "Events")));
@@ -183,8 +183,8 @@ START_TEST(eolian_override)
183 eolian_init(); 183 eolian_init();
184 Eolian *eos = eolian_new(); 184 Eolian *eos = eolian_new();
185 /* Parsing */ 185 /* Parsing */
186 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 186 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
187 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/override.eo"))); 187 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/override.eo")));
188 188
189 /* Class */ 189 /* Class */
190 fail_if(!(class = eolian_class_get_by_name(unit, "Override"))); 190 fail_if(!(class = eolian_class_get_by_name(unit, "Override")));
@@ -240,8 +240,8 @@ START_TEST(eolian_consts)
240 eolian_init(); 240 eolian_init();
241 Eolian *eos = eolian_new(); 241 Eolian *eos = eolian_new();
242 /* Parsing */ 242 /* Parsing */
243 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 243 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
244 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/consts.eo"))); 244 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/consts.eo")));
245 fail_if(!(class = eolian_class_get_by_name(unit, "Consts"))); 245 fail_if(!(class = eolian_class_get_by_name(unit, "Consts")));
246 246
247 /* Method */ 247 /* Method */
@@ -267,8 +267,8 @@ START_TEST(eolian_ctor_dtor)
267 eolian_init(); 267 eolian_init();
268 Eolian *eos = eolian_new(); 268 Eolian *eos = eolian_new();
269 /* Parsing */ 269 /* Parsing */
270 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 270 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
271 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/ctor_dtor.eo"))); 271 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/ctor_dtor.eo")));
272 fail_if(!(class = eolian_class_get_by_name(unit, "Ctor_Dtor"))); 272 fail_if(!(class = eolian_class_get_by_name(unit, "Ctor_Dtor")));
273 fail_if(!(base = eolian_class_get_by_name(unit, "Base"))); 273 fail_if(!(base = eolian_class_get_by_name(unit, "Base")));
274 274
@@ -336,8 +336,8 @@ START_TEST(eolian_typedef)
336 eolian_init(); 336 eolian_init();
337 Eolian *eos = eolian_new(); 337 Eolian *eos = eolian_new();
338 /* Parsing */ 338 /* Parsing */
339 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 339 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
340 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/typedef.eo"))); 340 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/typedef.eo")));
341 341
342 /* Check that the class Dummy is still readable */ 342 /* Check that the class Dummy is still readable */
343 fail_if(!(class = eolian_class_get_by_name(unit, "Typedef"))); 343 fail_if(!(class = eolian_class_get_by_name(unit, "Typedef")));
@@ -421,8 +421,8 @@ START_TEST(eolian_complex_type)
421 eolian_init(); 421 eolian_init();
422 Eolian *eos = eolian_new(); 422 Eolian *eos = eolian_new();
423 /* Parsing */ 423 /* Parsing */
424 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 424 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
425 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/complex_type.eo"))); 425 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/complex_type.eo")));
426 fail_if(!(class = eolian_class_get_by_name(unit, "Complex_Type"))); 426 fail_if(!(class = eolian_class_get_by_name(unit, "Complex_Type")));
427 427
428 /* Properties return type */ 428 /* Properties return type */
@@ -505,8 +505,8 @@ START_TEST(eolian_scope)
505 eolian_init(); 505 eolian_init();
506 Eolian *eos = eolian_new(); 506 Eolian *eos = eolian_new();
507 /* Parsing */ 507 /* Parsing */
508 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 508 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
509 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/scope.eo"))); 509 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/scope.eo")));
510 fail_if(!(class = eolian_class_get_by_name(unit, "Scope"))); 510 fail_if(!(class = eolian_class_get_by_name(unit, "Scope")));
511 511
512 /* Property scope */ 512 /* Property scope */
@@ -548,8 +548,8 @@ START_TEST(eolian_simple_parsing)
548 eolian_init(); 548 eolian_init();
549 Eolian *eos = eolian_new(); 549 Eolian *eos = eolian_new();
550 /* Parsing */ 550 /* Parsing */
551 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 551 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
552 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/class_simple.eo"))); 552 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/class_simple.eo")));
553 fail_if(!(class = eolian_class_get_by_name(unit, "Class_Simple"))); 553 fail_if(!(class = eolian_class_get_by_name(unit, "Class_Simple")));
554 fail_if(eolian_class_get_by_file(unit, "class_simple.eo") != class); 554 fail_if(eolian_class_get_by_file(unit, "class_simple.eo") != class);
555 fail_if(strcmp(eolian_class_file_get(class), "class_simple.eo")); 555 fail_if(strcmp(eolian_class_file_get(class), "class_simple.eo"));
@@ -686,8 +686,8 @@ START_TEST(eolian_struct)
686 Eolian *eos = eolian_new(); 686 Eolian *eos = eolian_new();
687 687
688 /* Parsing */ 688 /* Parsing */
689 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 689 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
690 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/struct.eo"))); 690 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/struct.eo")));
691 691
692 /* Check that the class Dummy is still readable */ 692 /* Check that the class Dummy is still readable */
693 fail_if(!(class = eolian_class_get_by_name(unit, "Struct"))); 693 fail_if(!(class = eolian_class_get_by_name(unit, "Struct")));
@@ -754,8 +754,8 @@ START_TEST(eolian_extern)
754 Eolian *eos = eolian_new(); 754 Eolian *eos = eolian_new();
755 755
756 /* Parsing */ 756 /* Parsing */
757 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 757 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
758 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/extern.eo"))); 758 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/extern.eo")));
759 759
760 /* Check that the class Dummy is still readable */ 760 /* Check that the class Dummy is still readable */
761 fail_if(!(class = eolian_class_get_by_name(unit, "Extern"))); 761 fail_if(!(class = eolian_class_get_by_name(unit, "Extern")));
@@ -796,8 +796,8 @@ START_TEST(eolian_var)
796 Eolian *eos = eolian_new(); 796 Eolian *eos = eolian_new();
797 797
798 /* Parsing */ 798 /* Parsing */
799 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 799 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
800 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/var.eo"))); 800 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/var.eo")));
801 801
802 /* Check that the class Dummy is still readable */ 802 /* Check that the class Dummy is still readable */
803 fail_if(!(class = eolian_class_get_by_name(unit, "Var"))); 803 fail_if(!(class = eolian_class_get_by_name(unit, "Var")));
@@ -867,8 +867,8 @@ START_TEST(eolian_enum)
867 Eolian *eos = eolian_new(); 867 Eolian *eos = eolian_new();
868 868
869 /* Parsing */ 869 /* Parsing */
870 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 870 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
871 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/enum.eo"))); 871 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/enum.eo")));
872 872
873 /* Check that the class Dummy is still readable */ 873 /* Check that the class Dummy is still readable */
874 fail_if(!(class = eolian_class_get_by_name(unit, "Enum"))); 874 fail_if(!(class = eolian_class_get_by_name(unit, "Enum")));
@@ -963,8 +963,8 @@ START_TEST(eolian_class_funcs)
963 eolian_init(); 963 eolian_init();
964 Eolian *eos = eolian_new(); 964 Eolian *eos = eolian_new();
965 /* Parsing */ 965 /* Parsing */
966 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 966 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
967 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/class_funcs.eo"))); 967 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/class_funcs.eo")));
968 fail_if(!(class = eolian_class_get_by_name(unit, "Class_Funcs"))); 968 fail_if(!(class = eolian_class_get_by_name(unit, "Class_Funcs")));
969 969
970 /* Class properties */ 970 /* Class properties */
@@ -1004,8 +1004,8 @@ START_TEST(eolian_free_func)
1004 Eolian *eos = eolian_new(); 1004 Eolian *eos = eolian_new();
1005 1005
1006 /* Parsing */ 1006 /* Parsing */
1007 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 1007 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
1008 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/free_func.eo"))); 1008 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/free_func.eo")));
1009 1009
1010 /* Check that the class Dummy is still readable */ 1010 /* Check that the class Dummy is still readable */
1011 fail_if(!(class = eolian_class_get_by_name(unit, "Free_Func"))); 1011 fail_if(!(class = eolian_class_get_by_name(unit, "Free_Func")));
@@ -1054,8 +1054,8 @@ START_TEST(eolian_null)
1054 Eolian *eos = eolian_new(); 1054 Eolian *eos = eolian_new();
1055 1055
1056 /* Parsing */ 1056 /* Parsing */
1057 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 1057 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
1058 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/null.eo"))); 1058 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/null.eo")));
1059 1059
1060 fail_if(!(class = eolian_class_get_by_name(unit, "Null"))); 1060 fail_if(!(class = eolian_class_get_by_name(unit, "Null")));
1061 fail_if(!(func = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD))); 1061 fail_if(!(func = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
@@ -1103,9 +1103,9 @@ START_TEST(eolian_import)
1103 eolian_init(); 1103 eolian_init();
1104 Eolian *eos = eolian_new(); 1104 Eolian *eos = eolian_new();
1105 1105
1106 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 1106 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
1107 1107
1108 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/import.eo"))); 1108 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/import.eo")));
1109 fail_if(!(class = eolian_class_get_by_name(unit, "Import"))); 1109 fail_if(!(class = eolian_class_get_by_name(unit, "Import")));
1110 1110
1111 fail_if(!(tdl = eolian_typedecl_alias_get_by_name(unit, "Imported"))); 1111 fail_if(!(tdl = eolian_typedecl_alias_get_by_name(unit, "Imported")));
@@ -1131,9 +1131,9 @@ START_TEST(eolian_decl)
1131 eolian_init(); 1131 eolian_init();
1132 Eolian *eos = eolian_new(); 1132 Eolian *eos = eolian_new();
1133 1133
1134 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 1134 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
1135 1135
1136 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/decl.eo"))); 1136 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/decl.eo")));
1137 fail_if(!(class = eolian_class_get_by_name(unit, "Decl"))); 1137 fail_if(!(class = eolian_class_get_by_name(unit, "Decl")));
1138 1138
1139 fail_if(!(itr = eolian_declarations_get_by_file(eos, "decl.eo"))); 1139 fail_if(!(itr = eolian_declarations_get_by_file(eos, "decl.eo")));
@@ -1200,9 +1200,9 @@ START_TEST(eolian_docs)
1200 eolian_init(); 1200 eolian_init();
1201 Eolian *eos = eolian_new(); 1201 Eolian *eos = eolian_new();
1202 1202
1203 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 1203 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
1204 1204
1205 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/docs.eo"))); 1205 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/docs.eo")));
1206 1206
1207 fail_if(!(tdl = eolian_typedecl_struct_get_by_name(unit, "Foo"))); 1207 fail_if(!(tdl = eolian_typedecl_struct_get_by_name(unit, "Foo")));
1208 fail_if(!(doc = eolian_typedecl_documentation_get(tdl))); 1208 fail_if(!(doc = eolian_typedecl_documentation_get(tdl)));
@@ -1444,10 +1444,10 @@ START_TEST(eolian_function_types)
1444 eolian_init(); 1444 eolian_init();
1445 Eolian *eos = eolian_new(); 1445 Eolian *eos = eolian_new();
1446 1446
1447 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 1447 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
1448 1448
1449 /* Parsing */ 1449 /* Parsing */
1450 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/function_types.eot"))); 1450 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/function_types.eot")));
1451 1451
1452 /* void func(void); */ 1452 /* void func(void); */
1453 fail_if(!(decl = eolian_typedecl_alias_get_by_name(unit, "VoidFunc"))); 1453 fail_if(!(decl = eolian_typedecl_alias_get_by_name(unit, "VoidFunc")));
@@ -1572,9 +1572,9 @@ START_TEST(eolian_function_as_arguments)
1572 eolian_init(); 1572 eolian_init();
1573 Eolian *eos = eolian_new(); 1573 Eolian *eos = eolian_new();
1574 1574
1575 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 1575 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
1576 1576
1577 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/function_as_argument.eo"))); 1577 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/function_as_argument.eo")));
1578 1578
1579 fail_if(!(cls = eolian_class_get_by_name(unit, "Function_As_Argument"))); 1579 fail_if(!(cls = eolian_class_get_by_name(unit, "Function_As_Argument")));
1580 1580
@@ -1614,9 +1614,9 @@ START_TEST(eolian_parts)
1614 eolian_init(); 1614 eolian_init();
1615 Eolian *eos = eolian_new(); 1615 Eolian *eos = eolian_new();
1616 1616
1617 fail_if(!eolian_directory_scan(eos, PACKAGE_DATA_DIR"/data")); 1617 fail_if(!eolian_directory_scan(eos, TESTS_SRC_DIR"/data"));
1618 1618
1619 fail_if(!(unit = eolian_file_parse(eos, PACKAGE_DATA_DIR"/data/parts.eo"))); 1619 fail_if(!(unit = eolian_file_parse(eos, TESTS_SRC_DIR"/data/parts.eo")));
1620 1620
1621 fail_if(!(cls = eolian_class_get_by_name(unit, "Parts"))); 1621 fail_if(!(cls = eolian_class_get_by_name(unit, "Parts")));
1622 1622