Skip to content

Commit

Permalink
Cleanup. This concludes #133.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfbiedert committed Jan 12, 2025
1 parent d16c56a commit 1ba7ba9
Show file tree
Hide file tree
Showing 17 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions crates/backend_csharp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
//! };
//!
//! Generator::new(config, example_library_ffi::my_inventory())
//! .add_overload_writer(DotNet::new())
//! //.add_overload_writer(Unity::new())
//! .write_file("bindings/csharp/Interop.cs")?;
//!
Expand Down Expand Up @@ -97,7 +96,7 @@
//! public const string NativeLib = "example_library";
//!
//! /// Function using the type.
//! [DllImport(NativeLib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "my_function")]
//! [LibraryImport(NativeLib, EntryPoint = "my_function")]
//! public static extern Vec2 my_function(Vec2 input);
//! }
//!
Expand Down
1 change: 0 additions & 1 deletion crates/reference_project/src/patterns/slice.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::types::{CallbackFFISlice, Vec3f32};
use interoptopus::patterns::slice::{FFISlice, FFISliceMut};
use interoptopus::patterns::string::CStrPointer;
use interoptopus::{callback, ffi_function};

static HUGE_VEC_SLICE: [Vec3f32; 100_000] = [Vec3f32 { x: 0.0, y: 0.0, z: 0.0 }; 100_000];
Expand Down
2 changes: 1 addition & 1 deletion tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub mod backend_csharp;
pub use tempfile::tempdir;

/// Set this to `true` if you want to update bindings.
pub static UPDATE_BINDINGS: bool = true;
pub static UPDATE_BINDINGS: bool = false;

#[macro_export]
macro_rules! validate_output {
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/_folders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ mod c_reference_project;
mod cpython_benchmarks;
mod cpython_reference_project;
mod csharp_benchmarks;
mod csharp_reference_project_safe;
mod csharp_reference_project;
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ fn reference_benchmarks_prerequisites() -> Result<(), Error> {
let generated_common = Generator::new(config_common, ffi_inventory()).write_string()?;
let generated_other = Generator::new(config_other, ffi_inventory()).write_string()?;

validate_output!("tests/csharp_reference_project_safe", "Interop.common.cs", generated_common.as_str());
validate_output!("tests/csharp_reference_project_safe", "Interop.cs", generated_other.as_str());
validate_output!("tests/csharp_reference_project", "Interop.common.cs", generated_common.as_str());
validate_output!("tests/csharp_reference_project", "Interop.cs", generated_other.as_str());

run_dotnet_command_if_installed("tests/csharp_reference_project_safe", "test")?;
run_dotnet_command_if_installed("tests/csharp_reference_project", "test")?;

Ok(())
}

0 comments on commit 1ba7ba9

Please sign in to comment.