Skip to content

Commit

Permalink
Use a few autogenerated geometry functions in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Dec 23, 2022
1 parent 5329422 commit 63e65a3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions crates/icrate/src/Foundation/additions/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,7 @@ mod tests {
#[test]
#[cfg(any(all(feature = "apple", target_os = "macos"), feature = "gnustep-1-7"))] // or macabi
fn test_partial_eq() {
use objc2::runtime::Bool;

// Note: No need to use "C-unwind"
extern "C" {
fn NSEqualPoints(a: NSPoint, b: NSPoint) -> Bool;
fn NSEqualSizes(a: NSSize, b: NSSize) -> Bool;
fn NSEqualRects(a: NSRect, b: NSRect) -> Bool;
}
use crate::Foundation::{NSEqualPoints, NSEqualRects, NSEqualSizes};

// We assume that comparisons handle e.g. `x` and `y` in the same way,
// therefore we just set the coordinates / dimensions to the same.
Expand Down

0 comments on commit 63e65a3

Please sign in to comment.