|
|
|
@ -111,17 +111,17 @@ START_TEST(eolian_types_generation)
|
|
|
|
|
char output_filepath[PATH_MAX] = "";
|
|
|
|
|
snprintf(output_filepath, PATH_MAX, "%s/eolian_typedef",
|
|
|
|
|
eina_environment_tmp_get());
|
|
|
|
|
_remove_ref(output_filepath, "h");
|
|
|
|
|
_remove_ref(output_filepath, "stub.h");
|
|
|
|
|
_remove_ref(output_filepath, "eo.h");
|
|
|
|
|
_remove_ref(output_filepath, "eo.stub.h");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/typedef.eo", "-gh", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/typedef_ref.c", output_filepath, "h"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/typedef_ref.h", output_filepath, "eo.h"));
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/struct.eo", "-gh", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/struct_ref.c", output_filepath, "h"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/struct_ref.h", output_filepath, "eo.h"));
|
|
|
|
|
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/typedef.eo", "-gs", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/typedef_ref_stub.c", output_filepath, "stub.h"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/typedef_ref_stub.h", output_filepath, "eo.stub.h"));
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/struct.eo", "-gs", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/struct_ref_stub.c", output_filepath, "stub.h"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/struct_ref_stub.h", output_filepath, "eo.stub.h"));
|
|
|
|
|
}
|
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
|
@ -130,9 +130,9 @@ START_TEST(eolian_default_values_generation)
|
|
|
|
|
char output_filepath[PATH_MAX] = "";
|
|
|
|
|
snprintf(output_filepath, PATH_MAX, "%s/eolian_class_simple",
|
|
|
|
|
eina_environment_tmp_get());
|
|
|
|
|
_remove_ref(output_filepath, "c");
|
|
|
|
|
_remove_ref(output_filepath, "eo.c");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "-gc", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref.c", output_filepath, "c"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref.c", output_filepath, "eo.c"));
|
|
|
|
|
}
|
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
|
@ -141,9 +141,9 @@ START_TEST(eolian_override_generation)
|
|
|
|
|
char output_filepath[PATH_MAX] = "";
|
|
|
|
|
snprintf(output_filepath, PATH_MAX, "%s/eolian_override",
|
|
|
|
|
eina_environment_tmp_get());
|
|
|
|
|
_remove_ref(output_filepath, "c");
|
|
|
|
|
_remove_ref(output_filepath, "eo.c");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/override.eo", "-gc", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/override_ref.c", output_filepath, "c"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/override_ref.c", output_filepath, "eo.c"));
|
|
|
|
|
}
|
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
|
@ -152,12 +152,12 @@ START_TEST(eolian_functions_descriptions)
|
|
|
|
|
char output_filepath[PATH_MAX] = "";
|
|
|
|
|
snprintf(output_filepath, PATH_MAX, "%s/eolian_class_simple",
|
|
|
|
|
eina_environment_tmp_get());
|
|
|
|
|
_remove_ref(output_filepath, "h");
|
|
|
|
|
_remove_ref(output_filepath, "eo.h");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "-gh", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref_eo.h", output_filepath, "h"));
|
|
|
|
|
_remove_ref(output_filepath, "legacy.h");
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref_eo.h", output_filepath, "eo.h"));
|
|
|
|
|
_remove_ref(output_filepath, "eo.legacy.h");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "-gl", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref_legacy.h", output_filepath, "legacy.h"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref_legacy.h", output_filepath, "eo.legacy.h"));
|
|
|
|
|
}
|
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
|
@ -166,9 +166,9 @@ START_TEST(eolian_import)
|
|
|
|
|
char output_filepath[PATH_MAX] = "";
|
|
|
|
|
snprintf(output_filepath, PATH_MAX, "%s/eolian_import_types",
|
|
|
|
|
eina_environment_tmp_get());
|
|
|
|
|
_remove_ref(output_filepath, "h");
|
|
|
|
|
_remove_ref(output_filepath, "eot.h");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/import_types.eot", "-gh", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/import_types_ref.h", output_filepath, "h"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/import_types_ref.h", output_filepath, "eot.h"));
|
|
|
|
|
}
|
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
|
@ -177,12 +177,12 @@ START_TEST(eolian_docs)
|
|
|
|
|
char output_filepath[PATH_MAX] = "";
|
|
|
|
|
snprintf(output_filepath, PATH_MAX, "%s/eolian_docs",
|
|
|
|
|
eina_environment_tmp_get());
|
|
|
|
|
_remove_ref(output_filepath, "h");
|
|
|
|
|
_remove_ref(output_filepath, "eo.h");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "-gh", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/docs_ref.h", output_filepath, "h"));
|
|
|
|
|
_remove_ref(output_filepath, "legacy.h");
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/docs_ref.h", output_filepath, "eo.h"));
|
|
|
|
|
_remove_ref(output_filepath, "eo.legacy.h");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "-gl", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/docs_ref_legacy.h", output_filepath, "legacy.h"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/docs_ref_legacy.h", output_filepath, "eo.legacy.h"));
|
|
|
|
|
}
|
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
|
@ -193,19 +193,19 @@ START_TEST(eolian_function_pointers)
|
|
|
|
|
char output_filepath[PATH_MAX] = "";
|
|
|
|
|
snprintf(output_filepath, PATH_MAX, "%s/eolian_function_pointers",
|
|
|
|
|
eina_environment_tmp_get());
|
|
|
|
|
_remove_ref(output_filepath, "h");
|
|
|
|
|
_remove_ref(output_filepath, "eot.h");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/function_types.eot", "-gh", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_types_ref.h", output_filepath, "h"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_types_ref.h", output_filepath, "eot.h"));
|
|
|
|
|
|
|
|
|
|
// .eo.h
|
|
|
|
|
_remove_ref(output_filepath, "h");
|
|
|
|
|
_remove_ref(output_filepath, "eo.h");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/function_as_argument.eo", "-gh", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_as_argument_ref.h", output_filepath, "h"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_as_argument_ref.h", output_filepath, "eo.h"));
|
|
|
|
|
|
|
|
|
|
// .eo.c
|
|
|
|
|
_remove_ref(output_filepath, "c");
|
|
|
|
|
_remove_ref(output_filepath, "eo.c");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/function_as_argument.eo", "-gc", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_as_argument_ref.c", output_filepath, "c"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/function_as_argument_ref.c", output_filepath, "eo.c"));
|
|
|
|
|
|
|
|
|
|
// .eo.imp.c
|
|
|
|
|
_remove_ref(output_filepath, "c");
|
|
|
|
@ -222,9 +222,9 @@ START_TEST(owning)
|
|
|
|
|
char output_filepath[PATH_MAX] = "";
|
|
|
|
|
snprintf(output_filepath, PATH_MAX, "%s/eolian_owning",
|
|
|
|
|
eina_environment_tmp_get());
|
|
|
|
|
_remove_ref(output_filepath, "c");
|
|
|
|
|
_remove_ref(output_filepath, "eo.c");
|
|
|
|
|
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/owning.eo", "-gc", output_filepath));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/owning.eo.c", output_filepath, "c"));
|
|
|
|
|
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/owning.eo.c", output_filepath, "eo.c"));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
END_TEST
|
|
|
|
|