test: move basic test to library file
This commit is contained in:
@@ -85,3 +85,30 @@ mod ffi_point {
|
||||
}
|
||||
|
||||
pub use ffi_point::Point;
|
||||
|
||||
// Basic tests
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn point_creation() {
|
||||
let p = Point::new(1.0, 2.0, -3.0).expect("Failed to create point");
|
||||
let coords = p.coordinates();
|
||||
assert_eq!(coords, (1.0, 2.0, -3.0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn point_query() {
|
||||
let p = Point::new(5.5, 3.15, -0.001).expect("Failed to create point");
|
||||
let coords = p.coordinates();
|
||||
assert_eq!(coords, (5.5, 3.15, -0.001));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn point_deletion() {
|
||||
let p = Point::new(1.0, 2.0, 3.0).expect("Failed to create point");
|
||||
let result = p.delete();
|
||||
assert!(result.is_ok(), "Deletion should succeed for valid point");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,3 @@
|
||||
use arc_core::ffi::point::Point;
|
||||
|
||||
#[test]
|
||||
fn point_creation() {
|
||||
let p = Point::new(1.0, 2.0, 3.0).expect("Failed to create point");
|
||||
let coords = p.coordinates();
|
||||
assert_eq!(coords, (1.0, 2.0, 3.0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user