shortcut for writing test cases
(s: &str)
| 245 | fn test_parse() { |
| 246 | // shortcut for writing test cases |
| 247 | fn parse(s: &str) -> ByteSize { |
| 248 | s.parse::<ByteSize>().unwrap() |
| 249 | } |
| 250 | |
| 251 | assert_eq!(parse("0"), ByteSize::b(0)); |
| 252 | assert_eq!(parse("9.9"), ByteSize::b(10)); |
no test coverage detected