lib.rs 515 B

123456789101112131415161718192021222324
  1. mod bridge_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */
  2. mod api;
  3. #[cfg(test)]
  4. mod tests{
  5. use common::crs_convert::Position;
  6. #[test]
  7. fn position_test(){
  8. let jinan = Position{
  9. longitude: 117.0, latitude: 36.65
  10. };
  11. let qingdao = Position{
  12. longitude: 120.33, latitude: 36.07
  13. };
  14. let l = jinan.distance_to(&qingdao);
  15. println!("{}", l);
  16. }
  17. }