未验证 提交 7be0217d 编写于 作者: G Gary Qian 提交者: GitHub

Roll back _countryCode assert - breaking change (#6693)

* Roll back _countryCode assert - breaking change

* Add tests back in
上级 91a019cf
......@@ -169,8 +169,7 @@ class Locale {
this._countryCode,
]) : assert(_languageCode != null),
assert(_languageCode != ''),
scriptCode = null,
assert(_countryCode != '');
scriptCode = null;
/// Creates a new Locale object.
///
......
......@@ -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');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册