diff --git a/tests/expectations/both/function_sort_name.c b/tests/expectations/both/function_sort_name.c new file mode 100644 index 0000000..341f6a7 --- /dev/null +++ b/tests/expectations/both/function_sort_name.c @@ -0,0 +1,12 @@ +#include +#include +#include +#include + +void A(void); + +void B(void); + +void C(void); + +void D(void); diff --git a/tests/expectations/both/function_sort_name.compat.c b/tests/expectations/both/function_sort_name.compat.c new file mode 100644 index 0000000..9e8c7d6 --- /dev/null +++ b/tests/expectations/both/function_sort_name.compat.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +void A(void); + +void B(void); + +void C(void); + +void D(void); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus diff --git a/tests/expectations/both/function_sort_none.c b/tests/expectations/both/function_sort_none.c new file mode 100644 index 0000000..c7138c9 --- /dev/null +++ b/tests/expectations/both/function_sort_none.c @@ -0,0 +1,12 @@ +#include +#include +#include +#include + +void C(void); + +void B(void); + +void D(void); + +void A(void); diff --git a/tests/expectations/both/function_sort_none.compat.c b/tests/expectations/both/function_sort_none.compat.c new file mode 100644 index 0000000..a6138f7 --- /dev/null +++ b/tests/expectations/both/function_sort_none.compat.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +void C(void); + +void B(void); + +void D(void); + +void A(void); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus diff --git a/tests/expectations/function_sort_name.c b/tests/expectations/function_sort_name.c new file mode 100644 index 0000000..341f6a7 --- /dev/null +++ b/tests/expectations/function_sort_name.c @@ -0,0 +1,12 @@ +#include +#include +#include +#include + +void A(void); + +void B(void); + +void C(void); + +void D(void); diff --git a/tests/expectations/function_sort_name.compat.c b/tests/expectations/function_sort_name.compat.c new file mode 100644 index 0000000..9e8c7d6 --- /dev/null +++ b/tests/expectations/function_sort_name.compat.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +void A(void); + +void B(void); + +void C(void); + +void D(void); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus diff --git a/tests/expectations/function_sort_name.cpp b/tests/expectations/function_sort_name.cpp new file mode 100644 index 0000000..267c080 --- /dev/null +++ b/tests/expectations/function_sort_name.cpp @@ -0,0 +1,16 @@ +#include +#include +#include +#include + +extern "C" { + +void A(); + +void B(); + +void C(); + +void D(); + +} // extern "C" diff --git a/tests/expectations/function_sort_none.c b/tests/expectations/function_sort_none.c new file mode 100644 index 0000000..c7138c9 --- /dev/null +++ b/tests/expectations/function_sort_none.c @@ -0,0 +1,12 @@ +#include +#include +#include +#include + +void C(void); + +void B(void); + +void D(void); + +void A(void); diff --git a/tests/expectations/function_sort_none.compat.c b/tests/expectations/function_sort_none.compat.c new file mode 100644 index 0000000..a6138f7 --- /dev/null +++ b/tests/expectations/function_sort_none.compat.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +void C(void); + +void B(void); + +void D(void); + +void A(void); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus diff --git a/tests/expectations/function_sort_none.cpp b/tests/expectations/function_sort_none.cpp new file mode 100644 index 0000000..715dcc8 --- /dev/null +++ b/tests/expectations/function_sort_none.cpp @@ -0,0 +1,16 @@ +#include +#include +#include +#include + +extern "C" { + +void C(); + +void B(); + +void D(); + +void A(); + +} // extern "C" diff --git a/tests/expectations/tag/function_sort_name.c b/tests/expectations/tag/function_sort_name.c new file mode 100644 index 0000000..341f6a7 --- /dev/null +++ b/tests/expectations/tag/function_sort_name.c @@ -0,0 +1,12 @@ +#include +#include +#include +#include + +void A(void); + +void B(void); + +void C(void); + +void D(void); diff --git a/tests/expectations/tag/function_sort_name.compat.c b/tests/expectations/tag/function_sort_name.compat.c new file mode 100644 index 0000000..9e8c7d6 --- /dev/null +++ b/tests/expectations/tag/function_sort_name.compat.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +void A(void); + +void B(void); + +void C(void); + +void D(void); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus diff --git a/tests/expectations/tag/function_sort_none.c b/tests/expectations/tag/function_sort_none.c new file mode 100644 index 0000000..c7138c9 --- /dev/null +++ b/tests/expectations/tag/function_sort_none.c @@ -0,0 +1,12 @@ +#include +#include +#include +#include + +void C(void); + +void B(void); + +void D(void); + +void A(void); diff --git a/tests/expectations/tag/function_sort_none.compat.c b/tests/expectations/tag/function_sort_none.compat.c new file mode 100644 index 0000000..a6138f7 --- /dev/null +++ b/tests/expectations/tag/function_sort_none.compat.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +void C(void); + +void B(void); + +void D(void); + +void A(void); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus diff --git a/tests/rust/function_sort_name.rs b/tests/rust/function_sort_name.rs new file mode 100644 index 0000000..ecd23c1 --- /dev/null +++ b/tests/rust/function_sort_name.rs @@ -0,0 +1,15 @@ +#[no_mangle] +pub extern "C" fn C() +{ } + +#[no_mangle] +pub extern "C" fn B() +{ } + +#[no_mangle] +pub extern "C" fn D() +{ } + +#[no_mangle] +pub extern "C" fn A() +{ } diff --git a/tests/rust/function_sort_none.rs b/tests/rust/function_sort_none.rs new file mode 100644 index 0000000..ecd23c1 --- /dev/null +++ b/tests/rust/function_sort_none.rs @@ -0,0 +1,15 @@ +#[no_mangle] +pub extern "C" fn C() +{ } + +#[no_mangle] +pub extern "C" fn B() +{ } + +#[no_mangle] +pub extern "C" fn D() +{ } + +#[no_mangle] +pub extern "C" fn A() +{ } diff --git a/tests/rust/function_sort_none.toml b/tests/rust/function_sort_none.toml new file mode 100644 index 0000000..27c7839 --- /dev/null +++ b/tests/rust/function_sort_none.toml @@ -0,0 +1,2 @@ +[fn] +sort_by = "None"