Home
last modified time | relevance | path

Searched refs:parse_size_from_string (Results 1 – 2 of 2) sorted by relevance

/DADK/dadk-config/src/rootfs/utils/
H A Dsize.rs39 parse_size_from_string(&s) in deserialize_size()
62 fn parse_size_from_string(size_str: &str) -> Option<usize> { in parse_size_from_string()
88 assert_eq!(parse_size_from_string("1024"), Some(1024)); in test_parse_size_from_string()
91 assert_eq!(parse_size_from_string("1K"), Some(1024)); in test_parse_size_from_string()
92 assert_eq!(parse_size_from_string("2M"), Some(2 * 1024 * 1024)); in test_parse_size_from_string()
93 assert_eq!(parse_size_from_string("3G"), Some(3 * 1024 * 1024 * 1024)); in test_parse_size_from_string()
96 assert_eq!(parse_size_from_string("0K"), Some(0)); in test_parse_size_from_string()
97 assert_eq!(parse_size_from_string("0M"), Some(0)); in test_parse_size_from_string()
98 assert_eq!(parse_size_from_string("0G"), Some(0)); in test_parse_size_from_string()
101 assert_eq!(parse_size_from_string(" in test_parse_size_from_string()
58 fn parse_size_from_string(size_str: &str) -> Option<usize> { parse_size_from_string() function
[all...]
H A Dsize.rs39 parse_size_from_string(&s) in deserialize_size()
62 fn parse_size_from_string(size_str: &str) -> Option<usize> { in parse_size_from_string() function
88 assert_eq!(parse_size_from_string("1024"), Some(1024)); in test_parse_size_from_string()
91 assert_eq!(parse_size_from_string("1K"), Some(1024)); in test_parse_size_from_string()
92 assert_eq!(parse_size_from_string("2M"), Some(2 * 1024 * 1024)); in test_parse_size_from_string()
93 assert_eq!(parse_size_from_string("3G"), Some(3 * 1024 * 1024 * 1024)); in test_parse_size_from_string()
96 assert_eq!(parse_size_from_string("0K"), Some(0)); in test_parse_size_from_string()
97 assert_eq!(parse_size_from_string("0M"), Some(0)); in test_parse_size_from_string()
98 assert_eq!(parse_size_from_string("0G"), Some(0)); in test_parse_size_from_string()
101 assert_eq!(parse_size_from_string("1k"), Some(1024)); in test_parse_size_from_string()
[all …]