aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-02 13:30:14 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-02 13:30:27 +0100
commit9ab45604592ec1aa23e806a10eba07b6ce2f73dd (patch)
treef020992e90d1e651921c8d6257cf2c9da74d542e
parenteolian: replace directory_scan and file_parse in tests (diff)
downloadefl-9ab45604592ec1aa23e806a10eba07b6ce2f73dd.tar.gz
eolian*: replace various directory_scan/file_parse
-rw-r--r--src/bin/eolian/main.c6
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc8
-rw-r--r--src/bin/eolian_js/main.cc6
-rw-r--r--src/bin/eolian_mono/eolian_mono.cc6
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_documentation.cc6
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_parse.cc4
6 files changed, 18 insertions, 18 deletions
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index ac556a55aa..7369d9e885 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -534,7 +534,7 @@ main(int argc, char **argv)
if (scan_system)
{
- if (!eolian_system_directory_scan(eos))
+ if (!eolian_state_system_directory_add(eos))
{
fprintf(stderr, "eolian: could not scan system directory\n");
goto end;
@@ -544,14 +544,14 @@ main(int argc, char **argv)
const char *inc;
EINA_LIST_FREE(includes, inc)
{
- if (!eolian_directory_scan(eos, inc))
+ if (!eolian_state_directory_add(eos, inc))
{
fprintf(stderr, "eolian: could not scan '%s'\n", inc);
goto end;
}
}
- const Eolian_Unit *src = eolian_file_parse(eos, input);
+ const Eolian_Unit *src = eolian_state_file_parse(eos, input);
if (!src)
{
fprintf(stderr, "eolian: could not parse file '%s'\n", input);
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 54aaa3534e..02a6fd7192 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -304,7 +304,7 @@ run(options_type const& opts)
for(auto&& name : opts.in_files)
{
- Eolian_Unit const* unit = ::eolian_file_parse(opts.state, name.c_str());
+ Eolian_Unit const* unit = ::eolian_state_file_parse(opts.state, name.c_str());
if(!unit)
{
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
@@ -369,13 +369,13 @@ database_load(options_type const& opts)
{
for (auto src : opts.include_dirs)
{
- if (!::eolian_directory_scan(opts.state, src.c_str()))
+ if (!::eolian_state_directory_add(opts.state, src.c_str()))
{
EINA_CXX_DOM_LOG_WARN(eolian_cxx::domain)
<< "Couldn't load eolian from '" << src << "'.";
}
}
- if (!::eolian_all_eot_files_parse(opts.state))
+ if (!::eolian_state_all_eot_files_parse(opts.state))
{
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
<< "Eolian failed parsing eot files";
@@ -387,7 +387,7 @@ database_load(options_type const& opts)
<< "No input file.";
assert(false && "Error parsing input file");
}
- if (!opts.main_header && !::eolian_file_parse(opts.state, opts.in_files[0].c_str()))
+ if (!opts.main_header && !::eolian_state_file_parse(opts.state, opts.in_files[0].c_str()))
{
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
<< "Failed parsing: " << opts.in_files[0] << ".";
diff --git a/src/bin/eolian_js/main.cc b/src/bin/eolian_js/main.cc
index 796aa8693f..7a474c1e87 100644
--- a/src/bin/eolian_js/main.cc
+++ b/src/bin/eolian_js/main.cc
@@ -489,18 +489,18 @@ int main(int argc, char** argv)
// Add include paths to eolian library
for(auto src : include_paths)
- if (!::eolian_directory_scan(src.c_str()))
+ if (!::eolian_state_directory_add(src.c_str()))
{
EINA_CXX_DOM_LOG_WARN(eolian::js::domain)
<< "Couldn't load eolian from '" << src << "'.";
}
- if (!::eolian_all_eot_files_parse())
+ if (!::eolian_state_all_eot_files_parse())
{
EINA_CXX_DOM_LOG_WARN(eolian::js::domain)
<< "Eolian failed parsing eot files";
assert(false && "Error parsing eot files");
}
- if (!::eolian_file_parse(in_file.c_str()))
+ if (!::eolian_state_file_parse(in_file.c_str()))
{
EINA_CXX_DOM_LOG_WARN(eolian::js::domain)
<< "Failed parsing: " << in_file << ".";
diff --git a/src/bin/eolian_mono/eolian_mono.cc b/src/bin/eolian_mono/eolian_mono.cc
index 616985e088..e2b0355530 100644
--- a/src/bin/eolian_mono/eolian_mono.cc
+++ b/src/bin/eolian_mono/eolian_mono.cc
@@ -212,13 +212,13 @@ database_load(options_type const& opts)
{
for (auto src : opts.include_dirs)
{
- if (!::eolian_directory_scan(opts.state, src.c_str()))
+ if (!::eolian_state_directory_add(opts.state, src.c_str()))
{
EINA_CXX_DOM_LOG_WARN(eolian_mono::domain)
<< "Couldn't load eolian from '" << src << "'.";
}
}
- if (!::eolian_all_eot_files_parse(opts.state))
+ if (!::eolian_state_all_eot_files_parse(opts.state))
{
EINA_CXX_DOM_LOG_ERR(eolian_mono::domain)
<< "Eolian failed parsing eot files";
@@ -230,7 +230,7 @@ database_load(options_type const& opts)
<< "No input file.";
assert(false && "Error parsing input file");
}
- if (!::eolian_file_parse(opts.state, opts.in_file.c_str()))
+ if (!::eolian_state_file_parse(opts.state, opts.in_file.c_str()))
{
EINA_CXX_DOM_LOG_ERR(eolian_mono::domain)
<< "Failed parsing: " << opts.in_file << ".";
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc b/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc
index 26f249432b..4ec7dfe56e 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc
@@ -22,9 +22,9 @@ using efl::eolian::grammar::attributes::struct_def;
klass_def init_test_data(efl::eolian::eolian_state const& state)
{
- ck_assert(::eolian_directory_scan(state.value, PACKAGE_DATA_DIR));
- ck_assert(::eolian_all_eot_files_parse(state.value));
- ck_assert(::eolian_file_parse(state.value, PACKAGE_DATA_DIR"/docs.eo"));
+ ck_assert(::eolian_state_directory_add(state.value, PACKAGE_DATA_DIR));
+ ck_assert(::eolian_state_all_eot_files_parse(state.value));
+ ck_assert(::eolian_state_file_parse(state.value, PACKAGE_DATA_DIR"/docs.eo"));
const Eolian_Class *c_klass = ::eolian_class_get_by_name(state.as_unit(), "Docs");
ck_assert_ptr_ne(c_klass, NULL);
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_parse.cc b/src/tests/eolian_cxx/eolian_cxx_test_parse.cc
index 48d414663e..6618bc95dc 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_parse.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_parse.cc
@@ -12,8 +12,8 @@
START_TEST(eolian_cxx_test_parse_complex_types)
{
efl::eolian::eolian_init init;
- // fail_if(!::eolian_directory_scan(PACKAGE_DATA_DIR"/data"));
- // fail_if(!::eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/complex_type.eo"));
+ // fail_if(!::eolian_state_directory_add(PACKAGE_DATA_DIR"/data"));
+ // fail_if(!::eolian_state_file_parse(PACKAGE_DATA_DIR"/data/complex_type.eo"));
// TODO finish
}
END_TEST