Verify that date/number translations exist for all supported languages (#23692)

This commit is contained in:
Hans Muller
2018-10-30 07:28:00 -07:00
committed by GitHub
parent 7270f2845d
commit 3449edf256

View File

@@ -74,6 +74,17 @@ void main() {
expect(localizations.tabLabel(tabIndex: 2, tabCount: 5), isNot(contains(r'$tabCount')));
expect(() => localizations.tabLabel(tabIndex: 0, tabCount: 5), throwsAssertionError);
expect(() => localizations.tabLabel(tabIndex: 2, tabCount: 0), throwsAssertionError);
expect(localizations.formatHour(const TimeOfDay(hour: 10, minute: 0)), isNotNull);
expect(localizations.formatMinute(const TimeOfDay(hour: 10, minute: 0)), isNotNull);
expect(localizations.formatYear(DateTime(2018, 8, 1)), isNotNull);
expect(localizations.formatMediumDate(DateTime(2018, 8, 1)), isNotNull);
expect(localizations.formatFullDate(DateTime(2018, 8, 1)), isNotNull);
expect(localizations.formatMonthYear(DateTime(2018, 8, 1)), isNotNull);
expect(localizations.narrowWeekdays, isNotNull);
expect(localizations.narrowWeekdays.length, 7);
expect(localizations.formatDecimal(123), isNotNull);
expect(localizations.formatTimeOfDay(const TimeOfDay(hour: 10, minute: 0)), isNotNull);
});
}