Skip to content

Commit

Permalink
rename: Add a test for rename-all=prefix:
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Oct 27, 2024
1 parent b2e04b6 commit 3e7db6d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/expectations/rename_case.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ void test_snake_case(int32_t foo_bar);
void test_screaming_snake_case(int32_t FOO_BAR);

void test_gecko_case(int32_t aFooBar);

void test_prefix(int32_t prefix_foo_bar);
2 changes: 2 additions & 0 deletions tests/expectations/rename_case.compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ void test_screaming_snake_case(int32_t FOO_BAR);

void test_gecko_case(int32_t aFooBar);

void test_prefix(int32_t prefix_foo_bar);

#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
2 changes: 2 additions & 0 deletions tests/expectations/rename_case.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ void test_screaming_snake_case(int32_t FOO_BAR);

void test_gecko_case(int32_t aFooBar);

void test_prefix(int32_t prefix_foo_bar);

} // extern "C"
2 changes: 2 additions & 0 deletions tests/expectations/rename_case.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ cdef extern from *:
void test_screaming_snake_case(int32_t FOO_BAR);

void test_gecko_case(int32_t aFooBar);

void test_prefix(int32_t prefix_foo_bar);
4 changes: 4 additions & 0 deletions tests/rust/rename_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ pub extern "C" fn test_screaming_snake_case(foo_bar: i32) {}
/// cbindgen:rename-all=GeckoCase
#[no_mangle]
pub extern "C" fn test_gecko_case(foo_bar: i32) {}

/// cbindgen:rename-all=prefix:prefix_
#[no_mangle]
pub extern "C" fn test_prefix(foo_bar: i32) {}

0 comments on commit 3e7db6d

Please # to comment.