File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/test/java/org/apache/commons/io Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,13 @@ void testByteCountToDisplaySizeLong() {
421421 assertEquals ("1 PB" , FileUtils .byteCountToDisplaySize (1024L * 1024 * 1024 * 1024 * 1024 ));
422422 assertEquals ("1 EB" , FileUtils .byteCountToDisplaySize (1024L * 1024 * 1024 * 1024 * 1024 * 1024 ));
423423 assertEquals ("7 EB" , FileUtils .byteCountToDisplaySize (Long .MAX_VALUE ));
424+ // Constants
425+ assertEquals ("1 EB" , FileUtils .byteCountToDisplaySize (FileUtils .ONE_EB ));
426+ assertEquals ("1 GB" , FileUtils .byteCountToDisplaySize (FileUtils .ONE_GB ));
427+ assertEquals ("1 KB" , FileUtils .byteCountToDisplaySize (FileUtils .ONE_KB ));
428+ assertEquals ("1 MB" , FileUtils .byteCountToDisplaySize (FileUtils .ONE_MB ));
429+ assertEquals ("1 PB" , FileUtils .byteCountToDisplaySize (FileUtils .ONE_PB ));
430+ assertEquals ("1 TB" , FileUtils .byteCountToDisplaySize (FileUtils .ONE_TB ));
424431 // Other MAX_VALUEs
425432 assertEquals ("63 KB" , FileUtils .byteCountToDisplaySize (Character .MAX_VALUE ));
426433 assertEquals ("31 KB" , FileUtils .byteCountToDisplaySize (Short .MAX_VALUE ));
You can’t perform that action at this time.
0 commit comments