@@ -719,27 +719,27 @@ fn test_extern_generated_headers() {
719
719
// This test is for testing diffs of the generated C source and header files
720
720
// TODO: If another such feature is added, convert this test into a more generic
721
721
// test that looks at `tests/headers/generated` directory.
722
- let in_path = PathBuf :: from ( "tests/headers /generated" ) ;
723
- println ! ( "In path is ::: {}" , in_path . to_str( ) . unwrap( ) ) ;
722
+ let expect_path = PathBuf :: from ( "tests/expectations/tests /generated" ) ;
723
+ println ! ( "In path is ::: {}" , expect_path . to_str( ) . unwrap( ) ) ;
724
724
725
- let out_path = PathBuf :: from ( env:: var ( "OUT_DIR" ) . unwrap ( ) ) ;
726
- println ! ( "Out path is ::: {}" , out_path . to_str( ) . unwrap( ) ) ;
725
+ let generated_path = PathBuf :: from ( env:: var ( "OUT_DIR" ) . unwrap ( ) ) ;
726
+ println ! ( "Out path is ::: {}" , generated_path . to_str( ) . unwrap( ) ) ;
727
727
728
728
let _bindings = Builder :: default ( )
729
729
. header ( "tests/headers/generate-extern-functions.h" )
730
730
. generate_extern_functions ( true )
731
- . extern_functions_directory ( out_path . display ( ) . to_string ( ) )
731
+ . extern_functions_directory ( generated_path . display ( ) . to_string ( ) )
732
732
. generate ( )
733
733
. expect ( "Failed to generate bindings" ) ;
734
734
735
- let expected_c = fs:: read_to_string ( in_path . join ( "extern.c" ) )
735
+ let expected_c = fs:: read_to_string ( expect_path . join ( "extern.c" ) )
736
736
. expect ( "Could not read generated extern.c" ) ;
737
- let expected_h = fs:: read_to_string ( in_path . join ( "extern.h" ) )
737
+ let expected_h = fs:: read_to_string ( expect_path . join ( "extern.h" ) )
738
738
. expect ( "Could not read generated extern.h" ) ;
739
739
740
- let actual_c = fs:: read_to_string ( out_path . join ( "extern.c" ) )
740
+ let actual_c = fs:: read_to_string ( generated_path . join ( "extern.c" ) )
741
741
. expect ( "Could not read actual extern.c" ) ;
742
- let actual_h = fs:: read_to_string ( out_path . join ( "extern.h" ) )
742
+ let actual_h = fs:: read_to_string ( generated_path . join ( "extern.h" ) )
743
743
. expect ( "Could not read actual extern.h" ) ;
744
744
745
745
assert_eq ! ( expected_c, actual_c) ;
0 commit comments