summaryrefslogtreecommitdiff
path: root/src/tests/eolian/eolian_parsing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eolian/eolian_parsing.c')
-rw-r--r--src/tests/eolian/eolian_parsing.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index 41c4152b38..c4745cc7d6 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -1046,6 +1046,28 @@ START_TEST(eolian_null)
1046} 1046}
1047END_TEST 1047END_TEST
1048 1048
1049START_TEST(eolian_import)
1050{
1051 const Eolian_Class *class;
1052 const Eolian_Type *type;
1053
1054 eolian_init();
1055
1056 fail_if(!eolian_directory_scan(PACKAGE_DATA_DIR"/data"));
1057
1058 fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/import.eo"));
1059 fail_if(!(class = eolian_class_get_by_name("Import")));
1060
1061 fail_if(!(type = eolian_type_alias_get_by_name("Imported")));
1062 fail_if(strcmp(eolian_type_file_get(type), "import_types.eot"));
1063
1064 fail_if(!(type = eolian_type_struct_get_by_name("Imported_Struct")));
1065 fail_if(strcmp(eolian_type_file_get(type), "import_types.eot"));
1066
1067 eolian_shutdown();
1068}
1069END_TEST
1070
1049void eolian_parsing_test(TCase *tc) 1071void eolian_parsing_test(TCase *tc)
1050{ 1072{
1051 tcase_add_test(tc, eolian_simple_parsing); 1073 tcase_add_test(tc, eolian_simple_parsing);
@@ -1064,5 +1086,6 @@ void eolian_parsing_test(TCase *tc)
1064 tcase_add_test(tc, eolian_class_funcs); 1086 tcase_add_test(tc, eolian_class_funcs);
1065 tcase_add_test(tc, eolian_free_func); 1087 tcase_add_test(tc, eolian_free_func);
1066 tcase_add_test(tc, eolian_null); 1088 tcase_add_test(tc, eolian_null);
1089 tcase_add_test(tc, eolian_import);
1067} 1090}
1068 1091