diff --git a/pkg/_pub_shared/test/format/number_format_test.dart b/pkg/_pub_shared/test/format/number_format_test.dart index dd1062e9e..3b25a8367 100644 --- a/pkg/_pub_shared/test/format/number_format_test.dart +++ b/pkg/_pub_shared/test/format/number_format_test.dart @@ -31,39 +31,39 @@ void main() { }); test('Significant digit 0-999', () { - expect(computeWith3SignificantDigits(0), (value: '0', suffix: '')); - expect(computeWith3SignificantDigits(1), (value: '1', suffix: '')); - expect(computeWith3SignificantDigits(23), (value: '23', suffix: '')); - expect(computeWith3SignificantDigits(999), (value: '999', suffix: '')); + expect(formatWith3SignificantDigits(0), (value: '0', suffix: '')); + expect(formatWith3SignificantDigits(1), (value: '1', suffix: '')); + expect(formatWith3SignificantDigits(23), (value: '23', suffix: '')); + expect(formatWith3SignificantDigits(999), (value: '999', suffix: '')); }); test('Significant digit 1000-999499', () { - expect(computeWith3SignificantDigits(1000), (value: '1.00', suffix: 'k')); - expect(computeWith3SignificantDigits(1049), (value: '1.05', suffix: 'k')); - expect(computeWith3SignificantDigits(1051), (value: '1.05', suffix: 'k')); - expect(computeWith3SignificantDigits(1100), (value: '1.10', suffix: 'k')); - expect(computeWith3SignificantDigits(9500), (value: '9.50', suffix: 'k')); - expect(computeWith3SignificantDigits(99500), (value: '99.5', suffix: 'k')); - expect(computeWith3SignificantDigits(100490), (value: '100', suffix: 'k')); - expect(computeWith3SignificantDigits(100500), (value: '101', suffix: 'k')); - expect(computeWith3SignificantDigits(199500), (value: '200', suffix: 'k')); - expect(computeWith3SignificantDigits(999499), (value: '999', suffix: 'k')); + expect(formatWith3SignificantDigits(1000), (value: '1.00', suffix: 'k')); + expect(formatWith3SignificantDigits(1049), (value: '1.05', suffix: 'k')); + expect(formatWith3SignificantDigits(1051), (value: '1.05', suffix: 'k')); + expect(formatWith3SignificantDigits(1100), (value: '1.10', suffix: 'k')); + expect(formatWith3SignificantDigits(9500), (value: '9.50', suffix: 'k')); + expect(formatWith3SignificantDigits(99500), (value: '99.5', suffix: 'k')); + expect(formatWith3SignificantDigits(100490), (value: '100', suffix: 'k')); + expect(formatWith3SignificantDigits(100500), (value: '101', suffix: 'k')); + expect(formatWith3SignificantDigits(199500), (value: '200', suffix: 'k')); + expect(formatWith3SignificantDigits(999499), (value: '999', suffix: 'k')); }); test('Significant digit 999500-100000000', () { - expect(computeWith3SignificantDigits(999500), (value: '1.00', suffix: 'M')); - expect(computeWith3SignificantDigits(999999), (value: '1.00', suffix: 'M')); + expect(formatWith3SignificantDigits(999500), (value: '1.00', suffix: 'M')); + expect(formatWith3SignificantDigits(999999), (value: '1.00', suffix: 'M')); expect( - computeWith3SignificantDigits(900000000), (value: '900', suffix: 'M')); + formatWith3SignificantDigits(900000000), (value: '900', suffix: 'M')); expect( - computeWith3SignificantDigits(999500000), (value: '1.00', suffix: 'B')); - expect(computeWith3SignificantDigits(1009450000), - (value: '1.01', suffix: 'B')); - expect(computeWith3SignificantDigits(1094599999), - (value: '1.09', suffix: 'B')); - expect(computeWith3SignificantDigits(1095000001), - (value: '1.10', suffix: 'B')); - expect(computeWith3SignificantDigits(19000000000), + formatWith3SignificantDigits(999500000), (value: '1.00', suffix: 'B')); + expect( + formatWith3SignificantDigits(1009450000), (value: '1.01', suffix: 'B')); + expect( + formatWith3SignificantDigits(1094599999), (value: '1.09', suffix: 'B')); + expect( + formatWith3SignificantDigits(1095000001), (value: '1.10', suffix: 'B')); + expect(formatWith3SignificantDigits(19000000000), (value: '19.0', suffix: 'B')); }); }