diff --git a/lib/ui/window.dart b/lib/ui/window.dart index fff5eb46206bc4f2f2e81808b29a27a2ce7fc16f..57b40bf1cdffae0ba6f8aefcc2ef98ac7af6a8ae 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -169,8 +169,7 @@ class Locale { this._countryCode, ]) : assert(_languageCode != null), assert(_languageCode != ''), - scriptCode = null, - assert(_countryCode != ''); + scriptCode = null; /// Creates a new Locale object. /// diff --git a/testing/dart/locale_test.dart b/testing/dart/locale_test.dart index 4613a707510c42a374266e232212d587d49ad530..66fd537a724446eb09a2f8e3bae2b62f1fac2a60 100644 --- a/testing/dart/locale_test.dart +++ b/testing/dart/locale_test.dart @@ -12,6 +12,8 @@ void main() { expect(const Locale('en').toString(), 'en'); expect(const Locale('en'), new Locale('en', $null)); expect(const Locale('en').hashCode, new Locale('en', $null).hashCode); + expect(const Locale('en'), isNot(new Locale('en', ''))); + expect(const Locale('en').hashCode, isNot(new Locale('en', '').hashCode)); expect(const Locale('en', 'US').toString(), 'en_US'); expect(const Locale('iw').toString(), 'he'); expect(const Locale('iw', 'DD').toString(), 'he_DE');