Skip to content

Commit 9bb551f

Browse files
committed
test: rename files with cxx
1 parent df94b91 commit 9bb551f

File tree

4 files changed

+102
-7
lines changed

4 files changed

+102
-7
lines changed

bindgen-tests/tests/expectations/tests/generated/wrap_static_fns.cpp bindgen-tests/tests/expectations/tests/generated/wrap_static_fns_cxx.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "tests/headers/wrap-static-fns.hpp"
1+
#include "tests/headers/wrap-static-fns-cxx.hpp"
22

33
// Static wrappers
44

bindgen-tests/tests/expectations/tests/wrap-static-fns-cxx.rs

+95
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/tests.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -759,31 +759,31 @@ fn test_wrap_static_fns() {
759759
}
760760

761761
#[test]
762-
fn test_wrap_static_fns_cpp() {
762+
fn test_wrap_static_fns_cxx() {
763763
// This test is for testing diffs of the generated C source and header files
764764
// TODO: If another such feature is added, convert this test into a more generic
765765
// test that looks at `tests/headers/generated` directory.
766766
let expect_path = PathBuf::from("tests/expectations/tests/generated")
767-
.join("wrap_static_fns");
767+
.join("wrap_static_fns_cxx");
768768
println!("In path is ::: {}", expect_path.display());
769769

770770
let generated_path =
771-
PathBuf::from(env::var("OUT_DIR").unwrap()).join("wrap_static_fns");
771+
PathBuf::from(env::var("OUT_DIR").unwrap()).join("wrap_static_fns_cxx");
772772
println!("Out path is ::: {}", generated_path.display());
773773

774774
let _bindings = Builder::default()
775-
.header("tests/headers/wrap-static-fns.hpp")
775+
.header("tests/headers/wrap-static-fns-cxx.hpp")
776776
.wrap_static_fns(true)
777777
.wrap_static_fns_path(generated_path.display().to_string())
778778
.parse_callbacks(Box::new(parse_callbacks::WrapAsVariadicFn))
779779
.generate()
780780
.expect("Failed to generate bindings");
781781

782782
let expected_cpp = fs::read_to_string(expect_path.with_extension("cpp"))
783-
.expect("Could not read generated wrap_static_fns.cpp");
783+
.expect("Could not read generated wrap_static_fns_cxx.cpp");
784784

785785
let actual_cpp = fs::read_to_string(generated_path.with_extension("cpp"))
786-
.expect("Could not read actual wrap_static_fns.cpp");
786+
.expect("Could not read actual wrap_static_fns_cxx.cpp");
787787

788788
if expected_cpp != actual_cpp {
789789
error_diff_mismatch(

0 commit comments

Comments
 (0)