Refactor tests.
This commit is contained in:
		@@ -37,6 +37,24 @@ impl fmt::Display for StaticString {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod fieldtypes {
 | 
			
		||||
    use super::*;
 | 
			
		||||
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn convert_static_string() {
 | 
			
		||||
        let data = "a static string";
 | 
			
		||||
        let field = StaticString::new(data);
 | 
			
		||||
        let ftype: FieldType = field.into();
 | 
			
		||||
        assert!(
 | 
			
		||||
            ftype.to_string() == data,
 | 
			
		||||
            "\n\nGot:  {}\nWant: {}",
 | 
			
		||||
            ftype.to_string(),
 | 
			
		||||
            data
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod staticstrings {
 | 
			
		||||
    use super::*;
 | 
			
		||||
@@ -51,13 +69,6 @@ mod staticstrings {
 | 
			
		||||
            field.to_string(),
 | 
			
		||||
            data
 | 
			
		||||
        );
 | 
			
		||||
        let ftype: FieldType = field.into();
 | 
			
		||||
        assert!(
 | 
			
		||||
            ftype.to_string() == data,
 | 
			
		||||
            "\n\nGot:  {}\nWant: {}",
 | 
			
		||||
            ftype.to_string(),
 | 
			
		||||
            data
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[test]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user