Mercurial > core / rust/lib/obj/src/object.rs
changeset 698: |
96958d3eb5b0 |
parent: |
0ccbbd142694
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
3 //! Concrete object types and traits. All type definitions conform to 18 use std::{fs, str::FromStr}; 20 fn test_location_points() { 21 let pnt = location::Point::new(1.0, 2.0); 23 String::from_str("(\n lat: 1.0,\n lng: 2.0,\n)").unwrap(), 24 pnt.to_ron_string().unwrap() 27 location::Point::from_ron_str("(lat: 1.0, lng: 2.0)").unwrap(), 32 /// test file metadata 34 fn test_basic_file_metadata() { 35 let attr = fs::metadata("Cargo.toml").unwrap(); 36 println!("{:?}", attr); 41 let doc = doc::Doc::default(); 42 assert_eq!(doc.extension, doc::DocExtension::from_str("org").unwrap()); 47 let media = media::Media::new("test_media", "wav"); 50 media::MediaExtension::from_str("wav").unwrap()