@@ -309,21 +309,6 @@ fn format_packet_count(value: u128) -> String {
309309 }
310310}
311311
312- #[ cfg( test) ]
313- mod tests {
314- use super :: format_packet_count;
315-
316- #[ test]
317- fn test_format_packet_count ( ) {
318- assert_eq ! ( format_packet_count( 0 ) , "0" ) ;
319- assert_eq ! ( format_packet_count( 999 ) , "999" ) ;
320- assert_eq ! ( format_packet_count( 1_500 ) , "1.5K" ) ;
321- assert_eq ! ( format_packet_count( 999_999 ) , "999K" ) ;
322- assert_eq ! ( format_packet_count( 1_200_000 ) , "1.2M" ) ;
323- assert_eq ! ( format_packet_count( 123_000_000_000 ) , "123G" ) ;
324- }
325- }
326-
327312pub ( crate ) fn get_addresses_row (
328313 link_type : MyLinkType ,
329314 addresses : & Vec < Address > ,
@@ -509,3 +494,18 @@ fn get_export_pcap_group_maybe<'a>(
509494 . class ( ContainerType :: BorderedRound ) ,
510495 )
511496}
497+
498+ #[ cfg( test) ]
499+ mod tests {
500+ use super :: format_packet_count;
501+
502+ #[ test]
503+ fn test_format_packet_count ( ) {
504+ assert_eq ! ( format_packet_count( 0 ) , "0" ) ;
505+ assert_eq ! ( format_packet_count( 999 ) , "999" ) ;
506+ assert_eq ! ( format_packet_count( 1_500 ) , "1.5K" ) ;
507+ assert_eq ! ( format_packet_count( 999_999 ) , "999K" ) ;
508+ assert_eq ! ( format_packet_count( 1_200_000 ) , "1.2M" ) ;
509+ assert_eq ! ( format_packet_count( 123_000_000_000 ) , "123G" ) ;
510+ }
511+ }
0 commit comments