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

Unified Diff: pkg/intl/test/number_format_test.dart

Issue 607153002: Support percent/permille formats with positive and negative variations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update CHANGELOG.md and bump package version number Created 6 years, 3 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 | « pkg/intl/pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/test/number_format_test.dart
diff --git a/pkg/intl/test/number_format_test.dart b/pkg/intl/test/number_format_test.dart
index 83d53d89b9522c4c749add1df1cbce74c530c587..1ff898b2c1a01ac0c1037bd5ea41d026773ece6c 100644
--- a/pkg/intl/test/number_format_test.dart
+++ b/pkg/intl/test/number_format_test.dart
@@ -187,6 +187,12 @@ main() {
expect(readBack, amount);
});
+ test("Delta percent format", () {
+ var f = new NumberFormat("+#,##0%;-#,##0%");
+ expect(f.format(-0.07), "-7%");
+ expect(f.format(0.12), "+12%");
+ });
+
test('Unparseable', () {
var format = new NumberFormat.currencyPattern();
expect(() => format.parse("abcdefg"), throwsFormatException);
« no previous file with comments | « pkg/intl/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698