Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1036)

Unified Diff: test/number_format_test.dart

Issue 834313003: Fix bug with percent formats with no integer part (Closed) Base URL: https://github.com/dart-lang/intl.git@master
Patch Set: Review fixes Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/number_format_test.dart
diff --git a/test/number_format_test.dart b/test/number_format_test.dart
index 1ff898b2c1a01ac0c1037bd5ea41d026773ece6c..b6bc33a0be834f32b68323758c6ca87b48dff05a 100644
--- a/test/number_format_test.dart
+++ b/test/number_format_test.dart
@@ -143,6 +143,14 @@ main() {
}
});
+ test('Percent with no decimals and no integer part', () {
+ var number = new NumberFormat("#%");
+ var formatted = number.format(0.12);
+ expect(formatted, "12%");
+ var readBack = number.parse(formatted);
+ expect(0.12, readBack);
+ });
+
// We can't do these in the normal tests because those also format the
// numbers and we're reading them in a format where they won't print
// back the same way.
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698