Skip to content

Commit e68faf7

Browse files
committed
Rename tests/ffi/module.rs to alias.rs to clarify purpose
1 parent 890083d commit e68faf7

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

tests/BUCK

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rust_library(
1010
name = "ffi",
1111
srcs = [
1212
"ffi/lib.rs",
13-
"ffi/module.rs",
13+
"ffi/alias.rs",
1414
],
1515
crate = "cxx_test_suite",
1616
deps = [
@@ -23,8 +23,8 @@ cxx_library(
2323
name = "impl",
2424
srcs = [
2525
"ffi/tests.cc",
26+
":alias/source",
2627
":bridge/source",
27-
":module/source",
2828
],
2929
header_namespace = "cxx-test-suite",
3030
headers = {
@@ -40,6 +40,6 @@ rust_cxx_bridge(
4040
)
4141

4242
rust_cxx_bridge(
43-
name = "module",
44-
src = "ffi/module.rs",
43+
name = "alias",
44+
src = "ffi/alias.rs",
4545
)

tests/BUILD

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ rust_test(
1212
rust_library(
1313
name = "cxx_test_suite",
1414
srcs = [
15+
"ffi/alias.rs",
1516
"ffi/lib.rs",
16-
"ffi/module.rs",
1717
],
1818
deps = [
1919
":impl",
@@ -25,8 +25,8 @@ cc_library(
2525
name = "impl",
2626
srcs = [
2727
"ffi/tests.cc",
28+
":alias/source",
2829
":bridge/source",
29-
":module/source",
3030
],
3131
hdrs = ["ffi/tests.h"],
3232
include_prefix = "cxx-test-suite",
@@ -46,8 +46,8 @@ rust_cxx_bridge(
4646
)
4747

4848
rust_cxx_bridge(
49-
name = "module",
50-
src = "ffi/module.rs",
49+
name = "alias",
50+
src = "ffi/alias.rs",
5151
include_prefix = "cxx-test-suite",
5252
strip_include_prefix = "ffi",
5353
deps = [":impl"],
File renamed without changes.

tests/ffi/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fn main() {
33
return;
44
}
55

6-
let sources = vec!["lib.rs", "module.rs"];
6+
let sources = vec!["alias.rs", "lib.rs"];
77
cxx_build::bridges(sources)
88
.file("tests.cc")
99
.flag_if_supported(cxxbridge_flags::STD)

tests/ffi/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
clippy::trivially_copy_pass_by_ref
55
)]
66

7-
pub mod module;
7+
pub mod alias;
88

99
use cxx::{CxxString, CxxVector, UniquePtr};
1010
use std::fmt::{self, Display};

tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use cxx_test_suite::ffi;
1+
use cxx_test_suite::{alias, ffi};
22
use std::cell::Cell;
33
use std::ffi::CStr;
44

@@ -89,7 +89,7 @@ fn test_c_take() {
8989
check!(ffi::c_take_shared(ffi::Shared { z: 2020 }));
9090
check!(ffi::c_take_box(Box::new(2020)));
9191
check!(ffi::c_take_ref_c(&unique_ptr));
92-
check!(cxx_test_suite::module::ffi::c_take_unique_ptr(unique_ptr));
92+
check!(alias::ffi::c_take_unique_ptr(unique_ptr));
9393
check!(ffi::c_take_str("2020"));
9494
check!(ffi::c_take_sliceu8(b"2020"));
9595
check!(ffi::c_take_rust_string("2020".to_owned()));

0 commit comments

Comments
 (0)