string output = nice_unit_format(two_bytes);
BOOST_CHECK_EQUAL(string("2.00 Bytes"), output);
-// output = nice_unit_format(two_bytes, US_IEC, SHORT);
- output = format_kb(two_bytes);
+ output = nice_unit_format(two_bytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("2.0 B"), output);
}
string output = nice_unit_format(two_kilobytes);
BOOST_CHECK_EQUAL(string("2.00 KBytes"), output);
- // output = nice_unit_format(two_kilobytes, US_IEC);
- output = format_kb(two_kilobytes);
+ output = nice_unit_format(two_kilobytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("2.0 KB"), output);
const int64_t two_and_half_kilobytes = 2500;
output = nice_unit_format(two_and_half_kilobytes);
BOOST_CHECK_EQUAL(string("2.50 KBytes"), output);
- // output = nice_unit_format(two_and_half_kilobytes, US_IEC);
- output = format_kb(two_and_half_kilobytes);
+ output = nice_unit_format(two_and_half_kilobytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("2.4 KB"), output);
}
string output = nice_unit_format(two_megabytes);
BOOST_CHECK_EQUAL(string("2.00 MBytes"), output);
- output = format_kb(two_megabytes);
+ output = nice_unit_format(two_megabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("1.9 MB"), output);
const int64_t two_and_half_megabytes = 2500000;
output = nice_unit_format(two_and_half_megabytes);
BOOST_CHECK_EQUAL(string("2.50 MBytes"), output);
- output = format_kb(two_and_half_megabytes);
+ output = nice_unit_format(two_and_half_megabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("2.4 MB"), output);
}
string output = nice_unit_format(two_gigabytes);
BOOST_CHECK_EQUAL(string("2.00 GBytes"), output);
- output = format_kb(two_gigabytes);
+ output = nice_unit_format(two_gigabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("1.9 GB"), output);
const int64_t two_and_half_gigabytes = 2500000000LL;
output = nice_unit_format(two_and_half_gigabytes);
BOOST_CHECK_EQUAL(string("2.50 GBytes"), output);
- output = format_kb(two_and_half_gigabytes);
+ output = nice_unit_format(two_and_half_gigabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("2.3 GB"), output);
}
string output = nice_unit_format(two_terabytes);
BOOST_CHECK_EQUAL(string("2.00 TBytes"), output);
- output = format_kb(two_terabytes);
+ output = nice_unit_format(two_terabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("1.8 TB"), output);
const int64_t two_and_half_terabytes = 2500000000000LL;
output = nice_unit_format(two_and_half_terabytes);
BOOST_CHECK_EQUAL(string("2.50 TBytes"), output);
- output = format_kb(two_and_half_terabytes);
+ output = nice_unit_format(two_and_half_terabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("2.3 TB"), output);
}
string output = nice_unit_format(two_petabytes);
BOOST_CHECK_EQUAL(string("2.00 PBytes"), output);
- output = format_kb(two_petabytes);
+ output = nice_unit_format(two_petabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("1.8 PB"), output);
const int64_t two_and_half_petabytes = 2500000000000000LL;
output = nice_unit_format(two_and_half_petabytes);
BOOST_CHECK_EQUAL(string("2.50 PBytes"), output);
- output = format_kb(two_and_half_petabytes);
+ output = nice_unit_format(two_and_half_petabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("2.2 PB"), output);
}
string output = nice_unit_format(two_exabytes);
BOOST_CHECK_EQUAL(string("2.00 EBytes"), output);
- output = format_kb(two_exabytes);
+ output = nice_unit_format(two_exabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("1.7 EB"), output);
const int64_t two_and_half_exabytes = 2500000000000000000LL;
output = nice_unit_format(two_and_half_exabytes);
BOOST_CHECK_EQUAL(string("2.50 EBytes"), output);
- output = format_kb(two_and_half_exabytes);
+ output = nice_unit_format(two_and_half_exabytes, US_IEC, USF_SHORT);
BOOST_CHECK_EQUAL(string("2.2 EB"), output);
}